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.)
Severity
HIGH
CVSS v3
7.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H · source cna
Exploit chance (EPSS)
not scored
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Timeline
- 2026-11-18Published by the CNA07:34 UTC
- 2026-11-18Published in NVD08:17 UTC · 42 minutes after the CNA
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| gnu emacs | 31.1no fix listed | not listed |
References
- https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221
- https://debbugs.gnu.org/82213
- https://www.openwall.com/lists/oss-security/2026/11/11/7
- https://x3r0day.github.io
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-131959'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-131959'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-131959'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-131959'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).