CVE-2024-39331

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…

Critical · published June 23, 2024

CVSS v3.1
9.8
EPSS
1%
Percentile
70.5
In the wild
Unconfirmed
What it is

🚨 A seemingly harmless abbreviation can turn into a sneaky backdoor! In Emacs before 29.4, a crafted link can trigger unsafe functions like `shell-command-to-string`, opening the door to chaos! 🔥 Think of it as a restaurant accepting a reservation under a fake name. Your meal (or in this case, code) is prepared without any verification, leaving the kitchen open to all sorts of unwelcome surprises! An attacker could exploit this vulnerability to execute arbitrary shell commands on your system, potentially leading to unauthorized access, data breaches, or complete system compromise. This is absolutely devastating for users relying on Org Mode for their tasks and documentation!

Put simply

Think of it as a restaurant accepting a reservation under a fake name. Your meal (or in this case, code) is prepared without any verification, leaving the kitchen open to all sorts of unwelcome surprises! This flaw in Emacs, specifically in the `org-link-expand-abbrev` function, allows it to expand link abbreviations that invoke unsafe commands even when they shouldn't, bypassing essential safety checks and allowing malicious operations to execute.

What to do

An attacker could exploit this vulnerability to execute arbitrary shell commands on your system, potentially leading to unauthorized access, data breaches, or complete system compromise. This is absolutely devastating for users relying on Org Mode for their tasks and documentation! To protect yourself, immediately update Emacs to version 29.4 or higher and Org Mode to version 9.7.5 or above. Additionally, review your link abbreviations for any potential unsafe functions and sanitize your inputs to mitigate risks. 🛡️ You've got this! With these updates, you'll be back in control and ready to take on the world! 💪✨

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01323 · 70.5th percentile
Published
2024-06-23T00:00Z
EPSS history
Timeline
  • 23 JUN 00:00Z
    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…
    cvelistv5