AI analysis
GNU Emacs 28.1 through 31.1 can execute arbitrary code merely when a user opens a specially crafted file, because an untrusted, file-supplied value of read-symbol-shorthands is mishandled by the intern and unintern functions (CWE-829, inclusion of functionality from an untrusted control sphere). The flaw triggers in the stock default configuration — no special user settings are required — so any user who opens an attacker-supplied file (via email, download, or a cloned repository) can have attacker-controlled Elisp run as their own account. Impact is confined to the local user's account (CVSS 4.0 7.5, local attack vector), but it is a realistic code-execution vector for developers who routinely open files from untrusted sources. There is no known public proof of concept, no indication of exploitation in the wild, and the CVE is not on CISA's KEV list.
What to do: Upgrade to an Emacs release newer than 31.1 (or your distribution's patched package) as soon as it is available. Until then, avoid opening files from untrusted or unknown sources, and consider setting enable-local-variables to nil (and enable-local-eval to nil) to block file-local settings such as read-symbol-shorthands. Review any recently opened files of unknown origin for signs of tampering or unexpected Elisp.
Affected
| GNU Project (Free Software Foundation) Emacs | 28.1 through 31.1 |
Estimated exposure
massplausibly millions of installations (order-of-magnitude estimate; exact counts unavailable) — Emacs is a desktop editor packaged in every major Linux/BSD distribution and on macOS/Windows with no telemetry or active-install counts, so this estimate is inferred from distribution prevalence and long-standing community estimates of a…
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
GNU Emacs 28.1 through 31.1 allows arbitrary code execution upon opening a file, because an untrusted value of read-symbol-shorthands affects the intern and unintern functions. This affects the default configuration; no particular user settings are required to trigger it.