CVE-2026-131959 (GCVE-0-2026-131959)

Vulnerability from cvelistv5 – Published: 2026-11-18 07:34 – Updated: 2026-11-18 15:38
VLAI
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.)
SSVC
Exploitation: none Automatable: no Technical Impact: total
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2026-11-18 15:38 UTC
CWE
  • CWE-829 - Inclusion of Functionality from Untrusted Control Sphere
Impacted products
Vendor Product Version
GNU Emacs Affected: 31.1 (custom)
    cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:*
Create a notification for this product.
Show details on NVD website

{
  "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\u003cbr\u003e(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": "\u003cdiv\u003eDo not open files in untrusted directories that contain a .dir-locals.el. Setting enable-dir-local-variables to nil disables directory-local variables.\u003cbr\u003e\u003c/div\u003e"
            }
          ],
          "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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-131959",
      "date": "2026-11-21",
      "epss": "0.00178",
      "percentile": "0.07466"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "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"
                  }
                ]
              }
            ],
            "source": "cve@mitre.org"
          }
        ],
        "cveTags": [],
        "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.)"
          }
        ],
        "id": "CVE-2026-131959",
        "lastModified": "2026-11-18T16:18:15.343",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "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"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "cve@mitre.org",
              "type": "Secondary"
            }
          ],
          "ssvcV203": [
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2026-131959",
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-11-18T15:38:21.461895Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2026-11-18T08:17:19.593",
        "references": [
          {
            "source": "cve@mitre.org",
            "url": "https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=205ae0b0583dbfe09e258164adbc49e130645221"
          },
          {
            "source": "cve@mitre.org",
            "url": "https://debbugs.gnu.org/82213"
          },
          {
            "source": "cve@mitre.org",
            "url": "https://www.openwall.com/lists/oss-security/2026/11/11/7"
          },
          {
            "source": "cve@mitre.org",
            "url": "https://x3r0day.github.io"
          }
        ],
        "sourceIdentifier": "cve@mitre.org",
        "vulnStatus": "Received",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-829"
              }
            ],
            "source": "cve@mitre.org",
            "type": "Secondary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-11-18T16:05:02+00:00",
      "cve": "CVE-2026-131959",
      "id": "CVE-2026-131959",
      "initial_release_date": "2026-11-18T07:34:30.502000+00:00",
      "product_status:known_not_affected": "25",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "emacs: .dir-locals.el auto-mode-alist bypass gives code execution on file open",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-131959.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-11-18T17:26:13Z",
      "cve": "CVE-2026-131959",
      "id": "CVE-2026-131959",
      "initial_release_date": "2026-11-18T17:26:13Z",
      "product_status:known_not_affected": "244",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-131959",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2026/cve-2026-131959.json",
      "version": "2"
    },
    "vulnrichment": {
      "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:29.610Z",
              "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\u003cbr\u003e(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": "\u003cdiv\u003eDo not open files in untrusted directories that contain a .dir-locals.el. Setting enable-dir-local-variables to nil disables directory-local variables.\u003cbr\u003e\u003c/div\u003e"
                }
              ],
              "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"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…