Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @xmldom/xmldom
  4. ›
  5. CVE-2026-83605

CVE-2026-83605: xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed

September 8, 2026

Element.setAttribute() in @xmldom/xmldom bypasses attribute name validation by calling the private _createAttribute(name) method, which performs no validation. The public createAttribute() method correctly validates names against an anchored QName pattern, but setAttribute() never uses it. The serializer escapes attribute values but trusts attribute names, allowing an attacker to inject additional attributes (including event handlers) into serialized output. The requireWellFormed: true option did not catch this.

References

  • github.com/advisories/GHSA-4w3w-2rp5-g8jm
  • github.com/xmldom/xmldom/commit/cba1321218b069182695813fa7565653708e172e
  • github.com/xmldom/xmldom/commit/d8212e632507eaf1d9f609657dd4c56abeb12d44
  • github.com/xmldom/xmldom/pull/1043
  • github.com/xmldom/xmldom/pull/1050
  • github.com/xmldom/xmldom/releases/tag/0.8.14
  • github.com/xmldom/xmldom/releases/tag/0.9.11
  • github.com/xmldom/xmldom/security/advisories/GHSA-4w3w-2rp5-g8jm
  • nvd.nist.gov/vuln/detail/CVE-2026-83605

Code Behaviors & Features

Detect and mitigate CVE-2026-83605 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.7.0 before 0.8.14, all versions starting from 0.9.0 before 0.9.11

Fixed versions

  • 0.8.14
  • 0.9.11

Solution

Upgrade to versions 0.8.14, 0.9.11 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-91: XML Injection (aka Blind XPath Injection)

Source file

npm/@xmldom/xmldom/CVE-2026-83605.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:20:16 +0000.