Code Injection Vulnerability in GNU Emacs by GNU
CVE-2026-131959

7.8HIGH

Key Information:

Vendor

Gnu

Status
Vendor
CVE Published:
18 November 2026

What is CVE-2026-131959?

GNU Emacs 31.1 contains a vulnerability that enables code injection through its processing of directory-local variables. An attacker can craft a malicious .dir-locals.el file that includes a (REGEXP FUNCTION t) entry in auto-mode-alist. When Emacs opens a file matching this entry, it executes the FUNCTION prior to validating it, allowing unauthorized execution of Emacs Lisp code with the same privileges as the Emacs process. This flaw poses a significant security risk, especially in environments where users may open files from untrusted sources.

Affected Version(s)

Emacs 31.1

References

CVSS V3.1

Score:
7.8
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
Required
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.