{"id":"CVE-2026-131959","published":"2026-11-18T07:34:30Z","modified":"2026-11-18T15:38:33Z","title":"GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables","vendor":"GNU","product":"Emacs","tier":"tail","description":{"text":"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.)","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00178,"percentile":0.07466,"provenance":"source"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"references":[{"url":"https://www.openwall.com/lists/oss-security/2026/11/11/7","tags":[]},{"url":"https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221","tags":[]},{"url":"https://x3r0day.github.io","tags":["third-party-advisory"]},{"url":"https://debbugs.gnu.org/82213","tags":[]}],"priority":{"score":7.0,"factors":[{"name":"EPSS percentile","points":1.49},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"gnu","affectedVersions":[{"vendor":"GNU","product":"Emacs","versions":["31.1"]}],"solutions":{"items":["Apply the fix from commit 205ae0b0583dbfe09e258164adbc49e130645221 (emacs-31 branch), or upgrade to Emacs 31.2 or later when released."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["Do not open files in untrusted directories that contain a .dir-locals.el. Setting enable-dir-local-variables to nil disables directory-local variables."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-11-18T15:38:21.461895Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-128466","exploited":false,"provenance":"source"}}