GNU Emacs
Emacs: emacs: arbitrary code execution in flymake mode
A code execution flaw was found in Emacs, affecting versions prior to 31.2. The Flymake mode using language backends other than Lisp would execute arbitrary code from the edited file while performing syntax checking. Viewing or editing untrusted files using Emacs could lead to arbitrary code execution with the privileges of the user running Emacs.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 31.2
Fixed in 31.2
Fixed in 1:29.4-14.el10_2.3
Fixed in 1:29.4-17.el10_3
Fixed in 1:26.1-15.el8_10.4
Fixed in 1:26.1-15.el8_10.4
Fixed in 1:27.2-18.el9_8.3
Fixed in 1:27.2-18.el9_9.1
Mitigation
Upgrade GNU Emacs to 31.2 or later.
Upgrade Red Hat Enterprise Linux 10 to 1:29.4-14.el10_2.3 or later.
Upgrade Red Hat Enterprise Linux 10 to 1:29.4-17.el10_3 or later.
Upgrade Red Hat Enterprise Linux 8 to 1:26.1-15.el8_10.4 or later.
Upgrade Red Hat Enterprise Linux 8 to 1:26.1-15.el8_10.4 or later.
Upgrade Red Hat Enterprise Linux 9 to 1:27.2-18.el9_8.3 or later.
Upgrade Red Hat Enterprise Linux 9 to 1:27.2-18.el9_9.1 or later.
Workaround
To mitigate this issue, users should avoid opening or editing untrusted text files with Emacs. Exercise caution when handling files from unknown or suspicious sources, as interacting with them can lead to arbitrary code execution.
References
- Vendor advisory access.redhat.com/errata/RHSA-2026:84591
- Vendor advisory access.redhat.com/errata/RHSA-2026:85245
- Vendor advisory access.redhat.com/errata/RHSA-2026:90800
4 more
- Vendor advisory access.redhat.com/errata/RHSA-2026:98574
- Vendor advisory access.redhat.com/errata/RHSA-2026:99160
- Patch github.com/emacs-mirror/emacs/commit/135e6f63f…
- Patch github.com/emacs-mirror/emacs/commit/abc802ee2…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.