CVE-2024-53920
emacs: arbitrary code execution via Lisp macro expansion
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · November 27, 2024
Updated · November 4, 2026
Description
A flaw was found in Emacs. Viewing or editing an untrusted Emacs Lisp source code file can cause arbitrary code execution due to unsafe macro expansion when a user has configured elisp-completion-at-point for code completion or has enabled automatic error checking, such as Flymake or Flycheck.
Statement
To exploit this flaw, an attacker needs to trick a user into opening an Emacs Lisp source code file with a crafted macro definition. Additionally, the user must have elisp-completion-at-point configured or automatic error checking enabled.
For these reasons, this flaw has been rated with a Moderate severity.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Do not open or view untrusted Emacs Lisp source code files.
Disabling auto-completion features and automatic error checking such as Flymake or Flycheck in untrusted Emacs Lisp source code files will mitigate this vulnerability.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-94 · Improper Control of Generation of Code