{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-131959","assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","state":"PUBLISHED","assignerShortName":"mitre","dateReserved":"2026-11-18T07:34:30.134Z","datePublished":"2026-11-18T07:34:30.502Z","dateUpdated":"2026-11-18T15:38:33.980Z"},"containers":{"cna":{"affected":[{"defaultStatus":"unknown","product":"Emacs","programFiles":["lisp/files.el"],"programRoutines":[{"name":"set-auto-mode--find-matching-alist-entry"}],"repo":"https://git.savannah.gnu.org/cgit/emacs.git","vendor":"GNU","versions":[{"status":"affected","version":"31.1","versionType":"custom"}]}],"descriptions":[{"lang":"en","value":"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.)"}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":7.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-829","description":"CWE-829 Inclusion of Functionality from Untrusted Control Sphere","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","shortName":"mitre","dateUpdated":"2026-11-18T07:34:30.502Z"},"references":[{"url":"https://www.openwall.com/lists/oss-security/2026/11/11/7"},{"url":"https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221"},{"tags":["third-party-advisory"],"url":"https://x3r0day.github.io"},{"url":"https://debbugs.gnu.org/82213"}],"solutions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Apply the fix from commit 205ae0b0583dbfe09e258164adbc49e130645221<br>(emacs-31 branch), or upgrade to Emacs 31.2 or later when released."}],"value":"Apply the fix from commit 205ae0b0583dbfe09e258164adbc49e130645221\n(emacs-31 branch), or upgrade to Emacs 31.2 or later when released."}],"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<div>Do not open files in untrusted directories that contain a .dir-locals.el. Setting enable-dir-local-variables to nil disables directory-local variables.<br></div>"}],"value":"Do not open files in untrusted directories that contain a .dir-locals.el. Setting enable-dir-local-variables to nil disables directory-local variables."}],"x_generator":{"engine":"CVE-Request-form 0.0.1"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*","versionStartIncluding":"31.1","versionEndIncluding":"31.1"}]}]}]},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-11-18T15:38:21.461895Z","id":"CVE-2026-131959","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-11-18T15:38:33.980Z"}}]}}