CVE-2024-39331: emacs · Code Injection
Affects emacsSource CVE Database V5
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
- 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:HExploitation evidence
Disclosed: evidence found.
CVE published 23 Jun 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by 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
| Product | Affected | Fixed in |
|---|---|---|
Debiandebian/emacspkg:deb/debian/emacsOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
- 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.
- If you cannot patch yet, restrict the opening of Org files from untrusted or unknown sources to prevent malicious code execution.
- Implement strict access controls and user permissions to limit who can run Emacs and open Org files, reducing the attack surface.
- Employ application whitelisting or sandboxing techniques to contain potential exploitation within Emacs processes.
- Monitor system logs and command execution traces for unusual activity indicative of exploitation attempts, such as unexpected shell commands spawned by Emacs.
- Educate users about the risks of opening unverified Org files and encourage safe handling practices.
- Consider disabling or restricting the use of org-link-expand-abbrev or related dynamic link expansion features if feasible in the short term.
- 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
- git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29 (opens in a new tab)
- list.orgmode.org/87sex5gdqc.fsf%40localhost/ (opens in a new tab)
- lists.gnu.org/archive/html/info-gnu-emacs/2024-06/msg00000.html (opens in a new tab)
- git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f4cc61636947b5c2f0afc67174dd369fe3277aa8 (opens in a new tab)
- openwall.com/lists/oss-security/2024/06/23/1 (opens in a new tab)
- openwall.com/lists/oss-security/2024/06/23/2 (opens in a new tab)
- news.ycombinator.com/item?id=40768225 (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/06/msg00023.html (opens in a new tab)
- lists.debian.org/debian-lts-announce/2024/06/msg00024.html (opens in a new tab)