CVE-2026-131959

HIGH CVSS 3.1: 7.8 EPSS 0.20%
Updated Nov 18, 2026
Gnu
Parameter Value
CVSS 7.8 (HIGH)
Affected Versions 31.1 — 31.1
Type CWE-829 (Inclusion of Functionality from Untrusted Source)
Vendor Gnu
Public PoC No

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

Attack Parameters

Attack Vector
Local
Requires local access
Attack Complexity
Low
Easy to exploit
Privileges Required
None
No privileges needed
User Interaction
Required
User action required

Impact Assessment

Confidentiality
High
Complete data leak
Integrity
High
Complete data modification
Availability
High
Complete denial of service

CVSS Vector v3.1

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Gnu Emacs
cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*
31.1 <= 31.1