CVE-2026-131959

published 18 Nov 2026 · updated 18 Nov 2026

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

7.8HighCVSS 7.8EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. No fixed version is recorded.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
GNUemacs=31.1

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in GNU, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-131959 severity on Zeptric[![CVE-2026-131959](https://zeptric.io/badge/cve/CVE-2026-131959.svg)](https://zeptric.io/cve/CVE-2026-131959)