CVE-2024-39331: Code Injection

Published Jun 23, 2024
·
Updated

GNU Emacs could allow a remote attacker to execute arbitrary code on the system, caused by a code injection flaw in org-link-expand-abbrev in lisp/ol.el. By sending a specially crafted request, an attacker could exploit this vulnerability to execute arbitrary code on the system.

Other sources

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.

Microsoft

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.

MITRE

Affected Software

11 affected componentsFixes available
redhat/emacs<29.4
29.4
IBM Cognos Analytics<=12.0.0-12.0.4
IBM Cognos Analytics<=11.2.0-11.2.4 FP5
debian/emacs
1:27.1+1-3.1+deb11u51:27.1+1-3.1+deb11u61:28.2+1-15+deb12u41:30.1+1-5
debian/org-mode<=9.5.2+dfsh-5
9.4.0+dfsg-1+deb11u39.7.27+dfsg-1
GNU Emacs<29.4
Microsoft cbl2 emacs 29.3-1
Microsoft azl3 emacs 29.4-1
Microsoft cbl2 emacs 29.3-1
Microsoft azl3 emacs 29.3-2
Microsoft cbl2 emacs 29.4-1

Event History

Jun 23, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·10:15 PM
DescriptionSeverityWeakness
Aug 5, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Description
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Sep 19, 2024
Data Sourced
via Launchpad·08:43 PM
Description
Mar 31, 2025
Data Sourced
via Ubuntu·02:40 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-39331?

CVE-2024-39331 is considered a security vulnerability due to unsafe function execution in Emacs' org-link-expand-abbrev.

2

How do I fix CVE-2024-39331?

To fix CVE-2024-39331, upgrade Emacs to version 29.4 or Org Mode to version 9.7.5 or later.

3

Which versions of Emacs are affected by CVE-2024-39331?

Emacs versions prior to 29.4 are affected by CVE-2024-39331.

4

Which versions of Org Mode need to be updated to address CVE-2024-39331?

Org Mode versions before 9.7.5 are affected and should be updated to this version or later.

5

What does CVE-2024-39331 exploit in Emacs?

CVE-2024-39331 exploits the ability to expand unsafe function links in the org-link-expand-abbrev feature of Emacs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203