Skip to main content
VulnerabilityPublished Updated

CVE-2024-39331: emacs · Code Injection

Affects emacsSource CVE Database V5

0

Not known to be exploited · CVSS 9.8 Critical : upgrade to 29.4 as a priority.

Data as of 26 Oct 2026, 12:54 UTC

CVSS 3.1 base score
9.8Critical
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.3% chance of exploitation in 30 days – higher than 70% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 29.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 23 Jun 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade the Debian debian/emacs package to 29.4.

Affected software

ProductAffectedFixed in
Debiandebian/emacspkg:deb/debian/emacsOther threatsAffected
  • <29.4
Fixed in
  • 29.4

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Upgrade Emacs to version 29.4 or later and Org Mode to version 9.7.5 or later as soon as official patches are available.
  2. If you cannot patch yet, restrict the opening of Org files from untrusted or unknown sources to prevent malicious code execution.
  3. Implement strict access controls and user permissions to limit who can run Emacs and open Org files, reducing the attack surface.
  4. Employ application whitelisting or sandboxing techniques to contain potential exploitation within Emacs processes.
  5. Monitor system logs and command execution traces for unusual activity indicative of exploitation attempts, such as unexpected shell commands spawned by Emacs.
  6. Educate users about the risks of opening unverified Org files and encourage safe handling practices.
  7. Consider disabling or restricting the use of org-link-expand-abbrev or related dynamic link expansion features if feasible in the short term.
  8. Maintain updated backups and incident response plans to quickly recover from potential compromises.

Description

In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5.

References

Community reviews

Loading reviews…