CVE-2026-131959
JSON

7.8high

GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables.

Severity
7.8high CVSS:3.1 by mitre
Exploit likelihood
0.18% (higher than 7% of CVEs; EPSS, by FIRST)
Published
Last changed
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.)

Affected

Product or packageVersionsReported by
GNU Emacs31.1CVE List

Classification

CWE-829

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-131959 changed 2026-11-18CVE Terms of Use
NVDCVE-2026-131959 changed 2026-11-18Public domain