{"api_version":"1","generated_at":"2026-12-01T14:51:25+00:00","cve":"CVE-2026-131959","urls":{"html":"https://cve.report/CVE-2026-131959","api":"https://cve.report/api/cve/CVE-2026-131959.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-131959","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-131959"},"summary":{"title":"CVE-2026-131959","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.)","state":"PUBLISHED","assigner":"mitre","published_at":"2026-11-18 08:17:19","updated_at":"2026-11-18 16:18:15"},"problem_types":["CWE-829","CWE-829 CWE-829 Inclusion of Functionality from Untrusted Control Sphere"],"metrics":[{"version":"3.1","source":"cve@mitre.org","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","data":{"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"}}],"references":[{"url":"https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221","name":"https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221","refsource":"cve@mitre.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://debbugs.gnu.org/82213","name":"https://debbugs.gnu.org/82213","refsource":"cve@mitre.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.openwall.com/lists/oss-security/2026/11/11/7","name":"https://www.openwall.com/lists/oss-security/2026/11/11/7","refsource":"cve@mitre.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://x3r0day.github.io","name":"https://x3r0day.github.io","refsource":"cve@mitre.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-131959","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-131959","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"GNU","product":"Emacs","version":"affected 31.1 custom","platforms":[]}],"timeline":[],"solutions":[{"source":"CNA","title":"","value":"Apply the fix from commit 205ae0b0583dbfe09e258164adbc49e130645221\n(emacs-31 branch), or upgrade to Emacs 31.2 or later when released.","time":"","lang":"en"}],"workarounds":[{"source":"CNA","title":"","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.","time":"","lang":"en"}],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"131959","cve":"CVE-2026-131959","epss":"0.002010000","percentile":"0.099910000","score_date":"2026-11-18","updated_at":"2026-11-19 00:14:16"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-131959","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","timestamp":"2026-11-18T15:38:21.461895Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-11-18T15:38:33.980Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"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"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*","versionEndIncluding":"31.1","versionStartIncluding":"31.1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"dateUpdated":"2026-11-18T07:34:30.502Z","orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","shortName":"mitre"},"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"}}},"cveMetadata":{"assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","assignerShortName":"mitre","cveId":"CVE-2026-131959","datePublished":"2026-11-18T07:34:30.502Z","dateReserved":"2026-11-18T07:34:30.134Z","dateUpdated":"2026-11-18T15:38:33.980Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-18 08:17:19","lastModifiedDate":"2026-11-18 16:18:15","problem_types":["CWE-829","CWE-829 CWE-829 Inclusion of Functionality from Untrusted Control Sphere"],"metrics":{"cvssMetricV31":[{"source":"cve@mitre.org","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-11-18T15:38:21.461895Z","id":"CVE-2026-131959","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"131959","Ordinal":"1","Title":"CVE-2026-131959","CVE":"CVE-2026-131959","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"131959","Ordinal":"1","NoteData":"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.)","Type":"Description","Title":"CVE-2026-131959"}]}}}