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

High 7.8 Published Updated
Exploited in the wild
Not known
Fix
None listed

What is CVE-2026-131959?

CVE-2026-131959 is a high-severity vulnerability in GNU Emacs, published on 18 Nov 2026.

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

Weakness: CWE-829

Which versions are affected by CVE-2026-131959?

How do I fix CVE-2026-131959?

No fix has been published for CVE-2026-131959 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-131959 being exploited?

There is no known exploitation of CVE-2026-131959 in the wild and no public exploit code.

Sources

Also known as GHSA-5hqm-5j9g-jhcr, UBUNTU-CVE-2026-131959.

Is CVE-2026-131959 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free