{"id":"CVE-2026-131959","aliases":["CVE-2026-131959"],"related":[],"kind":"vulnerability","state":"published","title":"GNU Emacs 31.1 contains a code injection vulnerability in its handling of directory-local variables.","summary":"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.)","summarySource":"cvelist","descriptions":[{"lang":"en","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.)","source":"cvelist"}],"published":"2026-11-18T07:34:30.502Z","modified":"2026-11-18T16:18:15.343Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-829"],"affected":[{"ranges":[{"type":"custom","version":"31.1","status":"affected"}],"vendor":"GNU","product":"Emacs","repo":"https://git.savannah.gnu.org/cgit/emacs.git","source":"cvelist"}],"references":[{"url":"https://www.openwall.com/lists/oss-security/2026/11/11/7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221","tags":[],"sources":["cvelist","nvd"]},{"url":"https://x3r0day.github.io","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://debbugs.gnu.org/82213","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-18T15:38:21.461Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-131959","url":"https://www.cve.org/CVERecord?id=CVE-2026-131959","licence":"CVE Terms of Use","modified":"2026-11-18T15:38:33.980Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-131959","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-131959","licence":"Public domain","modified":"2026-11-18T16:18:15.343Z"}],"updatedAt":"2026-11-25T22:59:51.768Z","epss":{"score":0.00176,"percentile":0.0744,"date":"2026-12-01T12:00:22.000Z"}}