# CVE-2026-131959: GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables.

- Severity: High 7.8 (CVSS:3.1, scored by mitre) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-11-18T07:34:30.502Z
- Modified: 2026-11-18T16:18:15.343Z
- Weaknesses: CWE-829
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: mitre

## 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.)

(As written by CVE List.)

## Affected

- GNU Emacs: 31.1

## References

- <https://www.openwall.com/lists/oss-security/2026/11/11/7>
- <https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221>
- <https://x3r0day.github.io> (third-party-advisory)
- <https://debbugs.gnu.org/82213>

## Sources

- CVE List: [CVE-2026-131959](https://www.cve.org/CVERecord?id=CVE-2026-131959), CVE Terms of Use, modified 2026-11-18
- NVD: [CVE-2026-131959](https://nvd.nist.gov/vuln/detail/CVE-2026-131959), Public domain, modified 2026-11-18

---

Page: https://cve.day/CVE-2026-131959 · Whole record: https://cve.day/CVE-2026-131959.json · Rebuilt by cve.day 2026-11-25T22:59:51.768Z
