CVE-2026-131959
GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables. A crafted .dir-locals.el can supply a (
High · 7.8
- CVSS
- 7.8
- EPSS
- 0.18% (p7)
- Published
- 2026-11-18
- Age
- 18d old
- Modified
- 2026-11-30
- Product
- GNU Emacs
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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.)
Sources
- NVD · first seen 18d ago · NVD terms of use
- OSV · first seen 18d ago · CC-BY 4.0
- CVE List · first seen 18d ago · CVE Terms of Use
References
- https://www.openwall.com/lists/oss-security/2026/11/11/7 other
- https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221 other
- https://x3r0day.github.io third-party-advisory
- https://debbugs.gnu.org/82213 other
- https://git.savannah.gnu.org/cgit/emacs.git package
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/131xxx/CVE-2026-131959.json advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-131959 advisory