cve.bz

CVE-2024-53920 gnu emacs: Code Injection

7.8 highEPSS 0.6%

High (7.8) in gnu emacs. EPSS 0.6% estimated probability of exploitation activity in the next 30 days.

On this page
In elisp-mode.el in GNU Emacs before 30.1, a user who chooses to invoke elisp-completion-at-point (for code completion) on untrusted Emacs Lisp source code can trigger unsafe Lisp macro expansion that allows attackers to execute arbitrary code. (This unsafe expansion also occurs if a user chooses to enable on-the-fly diagnosis that byte compiles untrusted Emacs Lisp source code.)

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 50th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2024-12-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-53920 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-53920?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-53920?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-53920 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
gnu:emacsbefore 30.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11emacs1:27.1+1-3.1+deb11u6DLA-4069-1
Debian12emacs1:28.2+1-15+deb12u4DEBIAN-CVE-2024-53920 DSA-5871-1
Debian13, 14emacs1:30.1+1-1DEBIAN-CVE-2024-53920
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 morexemacs21, xemacs21-packagesno fix listedUBUNTU-CVE-2024-53920
UbuntuPro:16.04:LTSemacs24no fix listedUBUNTU-CVE-2024-53920
UbuntuPro:18.04:LTSemacs25no fix listedUBUNTU-CVE-2024-53920
UbuntuPro:20.04:LTSemacs1:26.3+1-1ubuntu2+esm2UBUNTU-CVE-2024-53920 USN-8011-1
UbuntuPro:22.04:LTSemacs1:27.1+1-3ubuntu5.2+esm1UBUNTU-CVE-2024-53920 USN-8011-1
UbuntuPro:24.04:LTSemacs1:29.3+1-1ubuntu2+esm3UBUNTU-CVE-2024-53920 USN-8011-1
Red Hatenterprise_linux:8::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:26.1-15.el8_10RHSA-2025:11030
Red Hatenterprise_linux:8::baseosemacs, emacs-filesystem1:26.1-15.el8_10RHSA-2025:11030
Red Hatenterprise_linux:9::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-11.el9_5.2RHSA-2025:4787
Red Hatenterprise_linux:9::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-14.el9_6.2RHSA-2025:9448
Red Hatenterprise_linux:10.2emacs, emacs-nw, emacs-lucid and 8 more1:29.4-13.el10_2RHBA-2026:22541
Red Hatrhel_eus:9.2::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-8.el9_2.3RHSA-2025:4794
Red Hatrhel_eus:9.4::appstreamemacs, emacs-nox, emacs-lucid and 7 more1:27.2-10.el9_4.2RHSA-2025:4793
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 9 moreemacs27.2-150400.3.26.1SUSE-SU-2025:0798-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Basesystem 15 SP5 and 7 moreemacs27.2-150400.3.20.2SUSE-SU-2024:4392-1
openSUSELeap 15.5, Leap 15.6emacs27.2-150400.3.20.2SUSE-SU-2024:4392-1
openSUSELeap 15.6emacs27.2-150400.3.26.1SUSE-SU-2025:0798-1
openSUSETumbleweedemacs29.4-11.1openSUSE-SU-2024:14591-1
AlmaLinux8emacs, emacs-nox, emacs-lucid and 2 more1:26.1-15.el8_10ALSA-2025:11030
AlmaLinux9emacs, emacs-nox, emacs-lucid and 2 more1:27.2-11.el9_5.2ALSA-2025:4787
AlmaLinux9emacs, emacs-nox, emacs-lucid and 2 more1:27.2-14.el9_6.2ALSA-2025:9448
Rocky Linux8emacs1:26.1-15.el8_10RLSA-2025:11030
Rocky Linux9emacs1:27.2-11.el9_5.2RLSA-2025:4787
Rocky Linux9emacs1:27.2-14.el9_6.2RLSA-2025:9448
Azure Linux2emacs29.4-3AZL-53703
Azure Linux3emacs29.4-3AZL-53558

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

To exploit this flaw, an attacker needs to trick a user into opening an Emacs Lisp source code file with a crafted macro definition. Additionally, the user must have `elisp-completion-at-point` configured or automatic error checking enabled.

For these reasons, this flaw has been rated with a Moderate severity.

Red Hat's mitigation

Do not open or view untrusted Emacs Lisp source code files.

Disabling auto-completion features and automatic error checking such as Flymake or Flycheck in untrusted Emacs Lisp source code files will mitigate this vulnerability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10emacs-1:29.4-13.el10_2Fixed 2026-06-03RHBA-2026:22541
Red Hat Enterprise Linux 8emacs-1:26.1-15.el8_10Fixed 2025-07-15RHSA-2025:11030
Red Hat Enterprise Linux 9emacs-1:27.2-11.el9_5.2Fixed 2025-05-12RHSA-2025:4787
Red Hat Enterprise Linux 9emacs-1:27.2-14.el9_6.2Fixed 2025-06-24RHSA-2025:9448
Red Hat Enterprise Linux 9.2 Extended Update Supportemacs-1:27.2-8.el9_2.3Fixed 2025-05-12RHSA-2025:4794
Red Hat Enterprise Linux 9.4 Extended Update Supportemacs-1:27.2-10.el9_4.2Fixed 2025-05-12RHSA-2025:4793
Red Hat Discovery 2discovery/discovery-server-rhel9:2.0.0-1752592913Fixed 2025-07-21RHSA-2025:11487
Red Hat Enterprise Linux 6emacsOut of support scope
Red Hat Enterprise Linux 7emacsAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-53920.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON