Emacs: emacs: arbitrary code execution in flymake mode
Impact
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.
Source excerpt · redhatWhat to do
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.
Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
GNU Emacs · GNU Emacs
Other versions: unaffected
| Version / range | Source status |
|---|---|
| 0 to before 31.2 | affected |
Red Hat · Red Hat Enterprise Linux 10
Other versions: affected
| Version / range | Source status |
|---|---|
| 1:29.4-14.el10_2.3 to before * | unaffected |
Red Hat · Red Hat Enterprise Linux 8
Other versions: affected
| Version / range | Source status |
|---|---|
| 1:26.1-15.el8_10.4 to before * | unaffected |
Red Hat · Red Hat Enterprise Linux 8
Other versions: affected
| Version / range | Source status |
|---|---|
| 1:26.1-15.el8_10.4 to before * | unaffected |
Red Hat · Red Hat Enterprise Linux 9
Other versions: affected
| Version / range | Source status |
|---|---|
| 1:27.2-18.el9_8.3 to before * | unaffected |
Red Hat · Red Hat Enterprise Linux 6
Other versions: unknown
| Version / range | Source status |
|---|
Red Hat · Red Hat Enterprise Linux 7
Other versions: affected
| Version / range | Source status |
|---|
Original source description
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.
References
- Source reference access.redhat.com/errata/RHSA-2026:84591
- Source reference access.redhat.com/errata/RHSA-2026:85245
- Source reference access.redhat.com/errata/RHSA-2026:90800
- Security advisory access.redhat.com/security/cve/CVE-2026-96442
- Source reference bugzilla.redhat.com/show_bug.cgi
- Patch github.com/emacs-mirror/emacs/commit/135e6f63f08fee3d374fa1a5187bce941a2d3e3c
- Patch github.com/emacs-mirror/emacs/commit/abc802ee2eb0b1663349ddf22a461f8e54a383fb
- Security advisory www.openwall.com/lists/oss-security/2026/09/14/1