Code Injection Vulnerability in GNU Emacs by GNU
CVE-2026-131959
7.8HIGH
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