CVE-2026-131959

high

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

References

https://x3r0day.github.io

https://www.openwall.com/lists/oss-security/2026/11/11/7

https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-128466

https://debbugs.gnu.org/82213

https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221

Details

Source: Mitre, NVD

Published: 2026-11-18

Updated: 2026-11-18

Risk Information

CVSS v2

Base Score: 4.6

Vector: CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P

Severity: Medium

CVSS v3

Base Score: 7.8

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Severity: High

EPSS

EPSS: 0.00138