CVE-2026-131959
Description
GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables. A crafted .dir-locals.el can supply a (REGEXP FUNCTION t) entry in auto-mode-alist; when a matching file is opened, Emacs calls FUNCTION before set-auto-mode--dir-local-valid-p validates it, executing arbitrary Emacs Lisp with the privileges of the Emacs process. (Emacs 30.2 is unaffected.)
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-131959 NameCVE-2026-131959 DescriptionGNU Emacs 31.1 contains a code injection vulnerability in its handling ... SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) Vulnerable and fixed packages The table below lists information on source packages. Source…
CVE-2026-131959
| Name | CVE-2026-131959 |
| Description | GNU Emacs 31.1 contains a code injection vulnerability in its handling ... |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| emacs (PTS) | bookworm, bookworm (security) | 1:28.2+1-15+deb12u4 | fixed |
| trixie (security), trixie | 1:30.1+1-6+deb13u1 | fixed | |
| forky, sid | 1:30.2+1-11 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| emacs | source | (unstable) | (not affected) |
Notes
- emacs <not-affected> (Vulnerable code introduced later)
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=82213
https://www.openwall.com/lists/oss-security/2026/11/11/7
https://x3r0day.me/blog/emacs-dir-locals-code-execution/
Fixed by: https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221
Apply commands
- emacs <not-affected> (Vulnerable code introduced later)https://debbugs.gnu.org/cgi/bugreport.cgi?bug=82213https://www.openwall.com/lists/oss-security/2026/11/11/7https://x3r0day.me/blog/emacs-dir-locals-code-execution/Fixed by: https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221
OS impact
Debian Fixed 4 releases
| Version | Package | Status | Fixed in |
|---|---|---|---|
| trixie | emacs |
Not affected | — |
| sid | emacs |
Not affected | — |
| forky | emacs |
Not affected | — |
| bookworm | emacs |
Not affected | — |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| gnu | emacs | 31.1 | |
References
CWEs
CWE-829
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.