Skip to content
Fencer Vulns
critical 9.8

CVE-2024-39331 json

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…

published 2024-06-23 2 y ago modified 2026-11-04 5 d ago also EUVD-2024-37900

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 70%
public exploits
0
none known

Summary

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.

Patch / fix

  • gnu emacs 29.4
  • emacs Debian 12 1:28.2+1-15+deb12u3
  • emacs Debian 14, Debian 13 1:29.4+1-1
  • org-mode Debian 14, Debian 13 9.7.5+dfsg-1

debian advisories DEBIAN-CVE-2024-39331

  • emacs Ubuntu 22.04 LTS 1:27.1+1-3ubuntu5.2
  • emacs Ubuntu Pro 20.04 LTS 1:26.3+1-1ubuntu2+esm1
  • emacs Ubuntu Pro 24.04 LTS 1:29.3+1-1ubuntu2+esm1
  • emacs24 Ubuntu Pro 16.04 LTS 24.5+1-6ubuntu1.1+esm4
  • emacs25 Ubuntu Pro 18.04 LTS 25.2+1-6ubuntu0.1~esm2
  • org-mode Ubuntu Pro 16.04 LTS 8.3.3-2ubuntu0.1~esm1
  • org-mode Ubuntu Pro 18.04 LTS 9.1.6+dfsg-1ubuntu0.1~esm1
  • org-mode Ubuntu Pro 20.04 LTS 9.3.1+dfsg-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2024-39331

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • emacs RHEL 8 1:26.1-12.el8_10
  • emacs-nox RHEL 8 1:26.1-12.el8_10
  • emacs-lucid RHEL 8 1:26.1-12.el8_10
  • emacs-common RHEL 8 1:26.1-12.el8_10
  • emacs-terminal RHEL 8 1:26.1-12.el8_10
  • emacs-filesystem RHEL 8 1:26.1-12.el8_10
  • emacs RHEL 9 1:27.2-10.el9_4
  • emacs-nox RHEL 9 1:27.2-10.el9_4

red hat advisories RHSA-2024:6987RHSA-2024:6510RHSA-2024:6203RHSA-2024:4971

  • emacs SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Desktop Applications 15 SP6 +9 more 27.2-150400.3.17.1
  • emacs SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +4 more 25.3-150000.3.22.1
  • emacs SLES for SAP 12 SP5, SLES 12 SP5 24.3-25.20.1

suse advisories SUSE-SU-2024:2567-1SUSE-SU-2024:2297-1SUSE-SU-2024:2293-1

  • syft openSUSE Leap 16.0 1.45.0-bp160.1.1
  • syft openSUSE Tumbleweed 1.42.1-1.1
  • emacs openSUSE Tumbleweed 29.4-2.1

opensuse advisories openSUSE-SU-2026:20928-1openSUSE-SU-2026:10228-1openSUSE-SU-2024:14117-1

  • emacs AlmaLinux 8 1:26.1-12.el8_10
  • emacs-nox AlmaLinux 8 1:26.1-12.el8_10
  • emacs-lucid AlmaLinux 8 1:26.1-12.el8_10
  • emacs-common AlmaLinux 8 1:26.1-12.el8_10
  • emacs-terminal AlmaLinux 8 1:26.1-12.el8_10
  • emacs-filesystem AlmaLinux 8 1:26.1-12.el8_10
  • emacs AlmaLinux 9 1:27.2-10.el9_4
  • emacs-nox AlmaLinux 9 1:27.2-10.el9_4

almalinux advisories ALSA-2024:6987ALSA-2024:6510

  • emacs Rocky Linux 8 1:26.1-12.el8_10

rocky linux advisories RLSA-2024:6987

  • emacs CBL-Mariner 2.0, Azure Linux 3.0 29.4-1

azure linux advisories AZL-42868AZL-42925

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-39331 updated cvss 7.8

emacs: org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code

  • Red Hat Enterprise Linux 6 emacs, emacs-el, emacs-nox, emacs-common Red Hat Enterprise Linux 7 emacs, emacs-el, emacs-nox, emacs-common, emacs-terminal, emacs-filesystem
    affected: workaround, no fix planned “Do not open Org mode files or preview email attachments from untrusted sources.”
  • Red Hat Enterprise Linux AppStream (v. 8) emacs 26.1-12.el8_10, emacs-nox 26.1-12.el8_10, emacs-lucid 26.1-12.el8_10, emacs-common 26.1-12.el8_10, emacs-terminal 26.1-12.el8_10
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:6987
  • Red Hat Enterprise Linux AppStream (v. 9) emacs 27.2-10.el9_4, emacs-nox 27.2-10.el9_4, emacs-lucid 27.2-10.el9_4, emacs-common 27.2-10.el9_4, emacs-filesystem 27.2-10.el9_4
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:6510
  • Red Hat Enterprise Linux AppStream AUS (v.8.6) emacs 26.1-7.el8_6.5, emacs-nox 26.1-7.el8_6.5, emacs-lucid 26.1-7.el8_6.5, emacs-common 26.1-7.el8_6.5, emacs-terminal 26.1-7.el8_6.5 Red Hat Enterprise Linux AppStream E4S (v.8.6) emacs 26.1-7.el8_6.5, emacs-nox 26.1-7.el8_6.5, emacs-lucid 26.1-7.el8_6.5, emacs-common 26.1-7.el8_6.5, emacs-terminal 26.1-7.el8_6.5
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:4971
  • Red Hat Enterprise Linux AppStream EUS (v.8.8) emacs 26.1-10.el8_8.6, emacs-nox 26.1-10.el8_8.6, emacs-lucid 26.1-10.el8_8.6, emacs-common 26.1-10.el8_8.6, emacs-terminal 26.1-10.el8_8.6
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:6203
  • Red Hat Enterprise Linux AppStream TUS (v.8.6) emacs 26.1-7.el8_6.5, emacs-nox 26.1-7.el8_6.5, emacs-lucid 26.1-7.el8_6.5, emacs-common 26.1-7.el8_6.5, emacs-terminal 26.1-7.el8_6.5
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:4971
  • Red Hat Enterprise Linux BaseOS (v. 8) emacs 26.1-12.el8_10, emacs-filesystem 26.1-12.el8_10
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:6987
  • Red Hat Enterprise Linux BaseOS AUS (v.8.6) emacs 26.1-7.el8_6.5, emacs-filesystem 26.1-7.el8_6.5 Red Hat Enterprise Linux BaseOS E4S (v.8.6) emacs 26.1-7.el8_6.5, emacs-filesystem 26.1-7.el8_6.5
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:4971
show 4 more
  • Red Hat Enterprise Linux BaseOS EUS (v.8.8) emacs 26.1-10.el8_8.6, emacs-filesystem 26.1-10.el8_8.6
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:6203
  • Red Hat Enterprise Linux BaseOS TUS (v.8.6) emacs 26.1-7.el8_6.5, emacs-filesystem 26.1-7.el8_6.5
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHSA-2024:4971
  • Red Hat OpenShift AI 8 rhoai/odh-rhel8-operator v2.13.1-2, rhoai/odh-dashboard-rhel8 v2.13.1-1, rhoai/odh-modelmesh-rhel8 v2.13.1-1, rhoai/odh-operator-bundle v2.13.1-2, rhoai/odh-rhel8-operator v2.14.0-24, rhoai/odh-dashboard-rhel8 v2.14.0-11, +56 more
    fixed: vendor fix “Do not open Org mode files or preview email attachments from untrusted sources.” RHBA-2024:8413
  • Red Hat Enterprise Linux 10 emacs
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
2 y ago

Exploit prediction

1.31% chance of exploitation in the next 30 days, higher than 70% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

  • gnu emacs

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.