{"id":"EUVD-2026-69215","revision":null,"records":[{"revision":"8ba936aa7d2544988375eede2e458de1","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-83605","aliases":[],"title":"xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed","description":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.","state":0,"publishedAt":"2026-09-01T14:18:20.752+00:00","modifiedAt":"2026-09-03T17:35:55.385+00:00","affected":[{"ecosystem":"Vendor product","name":"xmldom","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"xmldom\",\n                    \"product\": \"xmldom\",\n                    \"versions\": [\n                        {\n                            \"version\": \"<= 0.6.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"xmldom","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"@xmldom\",\n                    \"product\": \"xmldom\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 0.7.0, < 0.8.14\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 0.9.0, < 0.9.11\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"severity":"HIGH"}],"references":["https://github.com/xmldom/xmldom/security/advisories/GHSA-4w3w-2rp5-g8jm","https://github.com/xmldom/xmldom/pull/1043","https://github.com/xmldom/xmldom/pull/1050","https://github.com/xmldom/xmldom/commit/cba1321218b069182695813fa7565653708e172e","https://github.com/xmldom/xmldom/commit/d8212e632507eaf1d9f609657dd4c56abeb12d44","https://github.com/xmldom/xmldom/releases/tag/0.8.14","https://github.com/xmldom/xmldom/releases/tag/0.9.11"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-83605","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-83605","identifiers":["CVE-2026-83605"]},"retained":false,"historicalAffected":[]},{"revision":"592d9cb3722e4f0aafb0cf67b02c1941","observedAt":"2026-11-17T19:30:42.119+00:00","statement":{"source":"euvd","id":"EUVD-2026-69215","aliases":["CVE-2026-83605","GHSA-4w3w-2rp5-g8jm"],"title":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private …","description":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"severity":null}],"references":["https://github.com/xmldom/xmldom/security/advisories/GHSA-4w3w-2rp5-g8jm","https://github.com/xmldom/xmldom/pull/1043","https://github.com/xmldom/xmldom/pull/1050","https://github.com/xmldom/xmldom/commit/cba1321218b069182695813fa7565653708e172e","https://github.com/xmldom/xmldom/commit/d8212e632507eaf1d9f609657dd4c56abeb12d44","https://github.com/xmldom/xmldom/releases/tag/0.8.14","https://github.com/xmldom/xmldom/releases/tag/0.9.11"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-69215","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 1, 2026, 2:18:20 PM","dateUpdated":"Sep 3, 2026, 5:35:55 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-3623","title":"IBM DataPower Gateway: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2023-53781","CVE-2025-14087","CVE-2025-14512","CVE-2025-21858","CVE-2025-22105","CVE-2025-37980","CVE-2025-38015","CVE-2025-38097","CVE-2025-38180","CVE-2025-38400","CVE-2025-38405","CVE-2025-38441","CVE-2025-38470","CVE-2025-38653","CVE-2025-39766","CVE-2025-39797","CVE-2025-39866","CVE-2025-40134","CVE-2025-48431","CVE-2025-5278","CVE-2025-68183","CVE-2025-68211","CVE-2025-68214","CVE-2025-68347","CVE-2025-68366","CVE-2025-68724","CVE-2025-71066","CVE-2025-71089","CVE-2026-12143","CVE-2026-13257","CVE-2026-13258","CVE-2026-13757","CVE-2026-14269","CVE-2026-14273","CVE-2026-14496","CVE-2026-14497","CVE-2026-14502","CVE-2026-14507","CVE-2026-14508","CVE-2026-14509","CVE-2026-14888","CVE-2026-14905","CVE-2026-14988","CVE-2026-14990","CVE-2026-14991","CVE-2026-14992","CVE-2026-14999","CVE-2026-15588","CVE-2026-15762","CVE-2026-15781","CVE-2026-15784","CVE-2026-15819","CVE-2026-15822","CVE-2026-15824","CVE-2026-16111","CVE-2026-16159","CVE-2026-16161","CVE-2026-16163","CVE-2026-16164","CVE-2026-16165","CVE-2026-16167","CVE-2026-16169","CVE-2026-16170","CVE-2026-16176","CVE-2026-16177","CVE-2026-16178","CVE-2026-16179","CVE-2026-16181","CVE-2026-16182","CVE-2026-16340","CVE-2026-16439","CVE-2026-16440","CVE-2026-16441","CVE-2026-2100","CVE-2026-22979","CVE-2026-22984","CVE-2026-22990","CVE-2026-23002","CVE-2026-23060","CVE-2026-23110","CVE-2026-23204","CVE-2026-23209","CVE-2026-23216","CVE-2026-23243","CVE-2026-23270","CVE-2026-23392","CVE-2026-23455","CVE-2026-2391","CVE-2026-31411","CVE-2026-31419","CVE-2026-31488","CVE-2026-31508","CVE-2026-31532","CVE-2026-31581","CVE-2026-31607","CVE-2026-31613","CVE-2026-31669","CVE-2026-31677","CVE-2026-31684","CVE-2026-31685","CVE-2026-33845","CVE-2026-33846","CVE-2026-3832","CVE-2026-3833","CVE-2026-4046","CVE-2026-41254","CVE-2026-41602","CVE-2026-41606","CVE-2026-41607","CVE-2026-42009","CVE-2026-42010","CVE-2026-42011","CVE-2026-42012","CVE-2026-42013","CVE-2026-42014","CVE-2026-42015","CVE-2026-43027","CVE-2026-43037","CVE-2026-43038","CVE-2026-43056","CVE-2026-43074","CVE-2026-43116","CVE-2026-43125","CVE-2026-43163","CVE-2026-43190","CVE-2026-43198","CVE-2026-43260","CVE-2026-43284","CVE-2026-43303","CVE-2026-43329","CVE-2026-43499","CVE-2026-43501","CVE-2026-43868","CVE-2026-43870","CVE-2026-4437","CVE-2026-4438","CVE-2026-45852","CVE-2026-46054","CVE-2026-46086","CVE-2026-46116","CVE-2026-46173","CVE-2026-46181","CVE-2026-46242","CVE-2026-46259","CVE-2026-46300","CVE-2026-46331","CVE-2026-46333","CVE-2026-46917","CVE-2026-46968","CVE-2026-47010","CVE-2026-47021","CVE-2026-47027","CVE-2026-47059","CVE-2026-47063","CVE-2026-48144","CVE-2026-48145","CVE-2026-5260","CVE-2026-52923","CVE-2026-52991","CVE-2026-53006","CVE-2026-53009","CVE-2026-53131","CVE-2026-53189","CVE-2026-53264","CVE-2026-53266","CVE-2026-5419","CVE-2026-5450","CVE-2026-55602","CVE-2026-55603","CVE-2026-55968","CVE-2026-55970","CVE-2026-58010","CVE-2026-58011","CVE-2026-58012","CVE-2026-58013","CVE-2026-58014","CVE-2026-58015","CVE-2026-58016","CVE-2026-58662","CVE-2026-59879","CVE-2026-59880","CVE-2026-60147","CVE-2026-60589","CVE-2026-61308","CVE-2026-63913","CVE-2026-63952","CVE-2026-64017","CVE-2026-64530","CVE-2026-64560","CVE-2026-70906","CVE-2026-70907","CVE-2026-74581","CVE-2026-82417","CVE-2026-82562","CVE-2026-83605","CVE-2026-83607","CVE-2026-83608","CVE-2026-83613","CVE-2026-83614","CVE-2026-83615","CVE-2026-83616","CVE-2026-83619"]},{"id":"RHSA-2026:69248","title":"Red Hat Security Advisory: Red Hat Developer Hub 1.9.9 release.","vulnerabilityIds":["CVE-2026-19534","CVE-2026-33818","CVE-2026-54272","CVE-2026-55553","CVE-2026-56853","CVE-2026-56858","CVE-2026-56859","CVE-2026-56860","CVE-2026-56862","CVE-2026-67214","CVE-2026-67312","CVE-2026-67422","CVE-2026-69152","CVE-2026-69192","CVE-2026-73086","CVE-2026-75899","CVE-2026-75931","CVE-2026-75975","CVE-2026-76172","CVE-2026-83605","CVE-2026-83607","CVE-2026-83608","CVE-2026-83613","CVE-2026-83614","CVE-2026-83615","CVE-2026-83616","CVE-2026-83619","CVE-2026-84292","CVE-2026-84394","CVE-2026-84961"]},{"id":"NCSC-2026-0431","title":"Kwetsbaarheden verholpen in IBM DataPower Gateway en onderliggende componenten","vulnerabilityIds":["CVE-2023-53781","CVE-2025-14087","CVE-2025-14512","CVE-2025-21858","CVE-2025-22105","CVE-2025-37980","CVE-2025-38015","CVE-2025-38097","CVE-2025-38180","CVE-2025-38400","CVE-2025-38405","CVE-2025-38441","CVE-2025-38470","CVE-2025-38653","CVE-2025-39766","CVE-2025-39797","CVE-2025-39866","CVE-2025-40134","CVE-2025-48431","CVE-2025-5278","CVE-2025-68183","CVE-2025-68211","CVE-2025-68214","CVE-2025-68347","CVE-2025-68366","CVE-2025-68724","CVE-2025-71066","CVE-2025-71089","CVE-2026-12143","CVE-2026-13257","CVE-2026-13258","CVE-2026-13757","CVE-2026-14269","CVE-2026-14273","CVE-2026-14496","CVE-2026-14497","CVE-2026-14502","CVE-2026-14507","CVE-2026-14508","CVE-2026-14509","CVE-2026-14888","CVE-2026-14905","CVE-2026-14988","CVE-2026-14990","CVE-2026-14991","CVE-2026-14992","CVE-2026-14999","CVE-2026-15588","CVE-2026-15762","CVE-2026-15781","CVE-2026-15784","CVE-2026-15819","CVE-2026-15822","CVE-2026-15824","CVE-2026-16111","CVE-2026-16159","CVE-2026-16161","CVE-2026-16163","CVE-2026-16164","CVE-2026-16165","CVE-2026-16167","CVE-2026-16169","CVE-2026-16170","CVE-2026-16176","CVE-2026-16177","CVE-2026-16178","CVE-2026-16179","CVE-2026-16181","CVE-2026-16182","CVE-2026-16340","CVE-2026-16439","CVE-2026-16440","CVE-2026-16441","CVE-2026-2100","CVE-2026-22979","CVE-2026-22984","CVE-2026-22990","CVE-2026-23002","CVE-2026-23060","CVE-2026-23110","CVE-2026-23204","CVE-2026-23209","CVE-2026-23216","CVE-2026-23243","CVE-2026-23270","CVE-2026-23392","CVE-2026-23455","CVE-2026-2391","CVE-2026-31411","CVE-2026-31419","CVE-2026-31488","CVE-2026-31508","CVE-2026-31532","CVE-2026-31581","CVE-2026-31607","CVE-2026-31613","CVE-2026-31669","CVE-2026-31677","CVE-2026-31684","CVE-2026-31685","CVE-2026-33845","CVE-2026-33846","CVE-2026-3832","CVE-2026-3833","CVE-2026-4046","CVE-2026-41254","CVE-2026-41602","CVE-2026-41606","CVE-2026-41607","CVE-2026-42009","CVE-2026-42010","CVE-2026-42011","CVE-2026-42012","CVE-2026-42013","CVE-2026-42014","CVE-2026-42015","CVE-2026-43027","CVE-2026-43037","CVE-2026-43038","CVE-2026-43056","CVE-2026-43074","CVE-2026-43116","CVE-2026-43125","CVE-2026-43163","CVE-2026-43190","CVE-2026-43198","CVE-2026-43260","CVE-2026-43284","CVE-2026-43303","CVE-2026-43329","CVE-2026-43499","CVE-2026-43501","CVE-2026-43868","CVE-2026-43870","CVE-2026-4437","CVE-2026-4438","CVE-2026-45852","CVE-2026-46054","CVE-2026-46086","CVE-2026-46116","CVE-2026-46173","CVE-2026-46181","CVE-2026-46242","CVE-2026-46259","CVE-2026-46300","CVE-2026-46331","CVE-2026-46333","CVE-2026-46917","CVE-2026-46968","CVE-2026-47010","CVE-2026-47021","CVE-2026-47027","CVE-2026-47059","CVE-2026-47063","CVE-2026-48144","CVE-2026-48145","CVE-2026-5260","CVE-2026-52923","CVE-2026-52991","CVE-2026-53006","CVE-2026-53009","CVE-2026-53131","CVE-2026-53189","CVE-2026-53264","CVE-2026-53266","CVE-2026-5419","CVE-2026-5450","CVE-2026-55602","CVE-2026-55603","CVE-2026-55968","CVE-2026-55970","CVE-2026-58010","CVE-2026-58011","CVE-2026-58012","CVE-2026-58013","CVE-2026-58014","CVE-2026-58015","CVE-2026-58016","CVE-2026-58662","CVE-2026-59879","CVE-2026-59880","CVE-2026-60147","CVE-2026-60589","CVE-2026-61308","CVE-2026-63913","CVE-2026-63952","CVE-2026-64017","CVE-2026-64530","CVE-2026-64560","CVE-2026-70906","CVE-2026-70907","CVE-2026-74581","CVE-2026-82417","CVE-2026-82562","CVE-2026-83605","CVE-2026-83607","CVE-2026-83608","CVE-2026-83613","CVE-2026-83614","CVE-2026-83615","CVE-2026-83616","CVE-2026-83619"]},{"id":"msrc_CVE-2026-83605","title":"xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed","vulnerabilityIds":["CVE-2026-83605"]},{"id":"WID-SEC-W-2026-3596","title":"IBM App Connect Enterprise: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2022-35948","CVE-2026-13149","CVE-2026-14257","CVE-2026-15157","CVE-2026-1527","CVE-2026-16728","CVE-2026-16729","CVE-2026-18149","CVE-2026-18540","CVE-2026-19534","CVE-2026-2391","CVE-2026-45820","CVE-2026-54272","CVE-2026-63670","CVE-2026-67213","CVE-2026-67214","CVE-2026-69152","CVE-2026-69192","CVE-2026-69198","CVE-2026-73566","CVE-2026-73646","CVE-2026-77037","CVE-2026-77063","CVE-2026-77078","CVE-2026-82333","CVE-2026-82417","CVE-2026-82562","CVE-2026-83605","CVE-2026-83606","CVE-2026-83607","CVE-2026-83608","CVE-2026-83609","CVE-2026-83610","CVE-2026-83611","CVE-2026-83612","CVE-2026-83613","CVE-2026-83614","CVE-2026-83615","CVE-2026-83616","CVE-2026-83618","CVE-2026-83619","CVE-2026-84292","CVE-2026-84371","CVE-2026-84375","CVE-2026-84890","CVE-2026-84933","CVE-2026-84947","CVE-2026-84961","CVE-2026-85008","CVE-2026-85014","CVE-2026-85024","CVE-2026-85152"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-69215","identifiers":["EUVD-2026-69215","CVE-2026-83605","GHSA-4w3w-2rp5-g8jm"]},"retained":false,"historicalAffected":[]},{"revision":"7f1837edb126456db29a16b12ce85369","observedAt":"2026-10-25T16:19:10.271+00:00","statement":{"source":"nvd","id":"CVE-2026-83605","aliases":[],"title":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private …","description":"xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. Prior to @xmldom/xmldom versions 0.8.14 and 0.9.11, and in xmldom version 0.6.0 and earlier, Element.setAttribute() calls the private _createAttribute(name) path without validating the attribute name, while Document.createAttribute(name) validates against QName. XMLSerializer.serializeToString() emits attribute names verbatim, and requireWellFormed: true did not validate them, so a crafted name can terminate the intended attribute and inject additional attributes, including event handlers, into browser-consumed output; synthesized xmlns:PREFIX declarations expose the same unchecked-name boundary. This issue is fixed in @xmldom/xmldom versions 0.8.14 and 0.9.11; no fixed version is available for xmldom.","state":0,"publishedAt":"2026-09-01T15:17:38.317+00:00","modifiedAt":"2026-09-08T21:11:31.703+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":8.7,"severity":"HIGH"}],"references":["https://github.com/xmldom/xmldom/commit/cba1321218b069182695813fa7565653708e172e","https://github.com/xmldom/xmldom/commit/d8212e632507eaf1d9f609657dd4c56abeb12d44","https://github.com/xmldom/xmldom/pull/1043","https://github.com/xmldom/xmldom/pull/1050","https://github.com/xmldom/xmldom/releases/tag/0.8.14","https://github.com/xmldom/xmldom/releases/tag/0.9.11","https://github.com/xmldom/xmldom/security/advisories/GHSA-4w3w-2rp5-g8jm"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-83605","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-91"],"productCriteria":[],"sourceDates":{"published":"2026-09-01T15:17:38.317","lastModified":"2026-09-08T21:11:31.703"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-83605","identifiers":["CVE-2026-83605"]},"retained":false,"historicalAffected":[]},{"revision":"138133ea56074715869a432cc5b41e45","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4w3w-2rp5-g8jm","aliases":["CVE-2026-83605"],"title":"xmldom: Attribute name injection via setAttribute() bypasses requireWellFormed","description":"## Summary\n\n`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.\n\n## Details\n\n`Element.setAttribute(name, value)` creates attribute nodes by calling the private `_createAttribute(name)` method, which performs no validation on the `name` parameter. In contrast, the public `Document.createAttribute(name)` method validates the name against the `QName` production before creating the attribute node.\n\nThe result is a two-tier validation system where the most commonly used API (`setAttribute`) takes the unvalidated path:\n\n- `doc.createAttribute(\"bad name\")` — throws `INVALID_CHARACTER_ERR` (correct).\n- `el.setAttribute(\"bad name\", \"value\")` — succeeds silently (vulnerable).\n\nThe serializer emits attribute names verbatim into the output. Because attribute values ARE escaped (quotes, ampersands, etc.), the injection must occur through the name. An attacker can terminate the current attribute and inject new ones by including quote and space characters in the attribute name.\n\n### Root Cause\n\n1. `setAttribute()` calls `_createAttribute()` (private, no validation) instead of `createAttribute()` (public, validates against `QName`).\n2. The serializer trusts attribute names and emits them unescaped.\n3. The serializer's `requireWellFormed` code path did not validate attribute names during serialization.\n\n## Proof of Concept\n\n```js\nconst { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom');\n\nconst impl = new DOMImplementation();\nconst serializer = new XMLSerializer();\nconst doc = impl.createDocument(null, 'root', null);\n\n// The attribute name contains a closing quote, a space, and a new attribute\ndoc.documentElement.setAttribute('class=\"safe\" onclick', 'alert(1)');\n\nconst output = serializer.serializeToString(doc, { requireWellFormed: true });\nconsole.log(output);\n// <root class=\"safe\" onclick=\"alert(1)\"/>\n//\n// The single setAttribute() call produced TWO attributes:\n//   1. class=\"safe\"\n//   2. onclick=\"alert(1)\"\n//\n// requireWellFormed: true did NOT prevent the injection.\n```\n\n### Demonstrating the validation gap\n\n```js\n// Public createAttribute correctly rejects invalid names:\ntry {\n  doc.createAttribute('class=\"safe\" onclick');\n} catch (e) {\n  console.log('createAttribute rejects:', e.message);\n}\n\n// But setAttribute (which uses _createAttribute) accepts the same input:\ndoc.documentElement.setAttribute('class=\"safe\" onclick', 'alert(1)');\n// No error thrown\n```\n\n## Impact\n\nApplications that use `setAttribute()` with any user-controlled portion of the attribute name are vulnerable to attribute injection attacks. This includes:\n\n- **Cross-Site Scripting (XSS)**: Injecting event handler attributes into HTML output consumed by browsers.\n- **Security attribute override**: Overriding security-relevant attributes such as `integrity`, `nonce`, `sandbox`, or `Content-Security-Policy` meta attributes.\n- **Validation bypass**: The public `createAttribute()` API validates while `setAttribute()` does not, creating an inconsistent security boundary that developers cannot rely on.\n- **requireWellFormed bypass**: Applications that adopted `requireWellFormed: true` as a mitigation for prior CVEs remained vulnerable.\n\n`@xmldom/xmldom` can also be used inside browsers, where it mirrors the DOM API. Unlike the browser's `setAttribute()`, which rejects an invalid attribute name with `InvalidCharacterError`, xmldom accepts it — developers may assume the same safety and skip validation.\n\n## Fix Applied\n\n> **⚠ Opt-in required.** Protection is not automatic. Existing serialization calls remain\n> vulnerable unless `{ requireWellFormed: true }` is explicitly passed. Applications that\n> serialize untrusted DOM content should audit all `serializeToString()` call sites and add it.\n\nWhen `{ requireWellFormed: true }` is passed, the serializer now validates each serialized attribute's qualified name against the XML `QName` production and throws `InvalidStateError` before emitting it. This covers ordinary attribute names **and** synthesized `xmlns:PREFIX` namespace declarations (the namespace-prefix sub-vector).\n\nFixed under `requireWellFormed: true` in `@xmldom/xmldom` **0.9.11** and **0.8.14**. Default serialization is unchanged.\n\n### PoC — fixed path\n\n```js\nconst { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom');\n\nconst doc = new DOMImplementation().createDocument(null, 'root', null);\ndoc.documentElement.setAttribute('class=\"safe\" onclick', 'alert(1)');\n\n// Default (unchanged): verbatim — injection present\nconsole.log(new XMLSerializer().serializeToString(doc));\n// <root class=\"safe\" onclick=\"alert(1)\"/>\n\n// Opt-in guard: throws InvalidStateError before serializing\ntry {\n  new XMLSerializer().serializeToString(doc, { requireWellFormed: true });\n} catch (e) {\n  console.log(e.name, e.message);\n  // InvalidStateError: The attribute name \"class=\"safe\" onclick\" is not a valid XML QName\n}\n```\n\n### Why the default stays verbatim\n\nThe W3C DOM Parsing and Serialization spec defines a `require well-formed` flag whose **default value is `false`**. With the flag unset, the serializer emits attribute names verbatim, matching the `XMLSerializer` behavior of Chrome, Firefox, and Safari. Unconditionally throwing would be a behavioral breaking change with no spec justification; the opt-in `requireWellFormed: true` flag lets applications that require injection safety enable strict mode without breaking existing code.\n\n### Residual limitation\n\n`setAttribute(name, value)` does not validate `name` at creation time (unlike the public `createAttribute()`, which already does). Making `setAttribute()` reject invalid names unconditionally is a breaking change and is deferred to the next breaking release. When the default serialization path is used (without `requireWellFormed: true`), attribute names set via `setAttribute()` are still emitted verbatim; applications that do not pass `requireWellFormed: true` remain exposed.\n\nCreation-time validation is tracked in a public issue on the next breaking-release milestone (filed at publication — issue link to be added), targeting the next breaking release.","state":0,"publishedAt":"2026-09-08T20:30:51+00:00","modifiedAt":"2026-09-08T20:45:04.329505+00:00","affected":[{"ecosystem":"npm","name":"@xmldom/xmldom","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.9.0"},{"kind":"fixed","version":"0.9.11"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@xmldom/xmldom","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.7.0"},{"kind":"fixed","version":"0.8.14"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"xmldom","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"0.6.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/xmldom/xmldom/security/advisories/GHSA-4w3w-2rp5-g8jm","https://nvd.nist.gov/vuln/detail/CVE-2026-83605","https://github.com/xmldom/xmldom/pull/1043","https://github.com/xmldom/xmldom/pull/1050","https://github.com/xmldom/xmldom/commit/cba1321218b069182695813fa7565653708e172e","https://github.com/xmldom/xmldom/commit/d8212e632507eaf1d9f609657dd4c56abeb12d44","https://github.com/xmldom/xmldom","https://github.com/xmldom/xmldom/releases/tag/0.8.14","https://github.com/xmldom/xmldom/releases/tag/0.9.11"],"sourceUrl":"https://github.com/advisories/GHSA-4w3w-2rp5-g8jm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4w3w-2rp5-g8jm","identifiers":["GHSA-4w3w-2rp5-g8jm","CVE-2026-83605"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-19T09:40:31.8345493+00:00","complete":true,"records":1786,"lastAttemptAt":"2026-11-19T09:40:31.8345493+00:00","lastSuccessAt":"2026-11-19T09:40:32.3515264+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:32.3515283+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-e55c589538e0700b45c7d6d41fe1447a79199283262c371c864535c791a040b9-9e2db0084925c841be762919585cd511a893087e7961941f7ebd76ab552c4302","complete":true,"records":428265,"lastAttemptAt":"2026-11-19T09:40:24.3145117+00:00","lastSuccessAt":"2026-11-19T09:40:24.1463366+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:24.3145117+00:00","snapshotPublishedAt":"2026-11-19T09:30:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-6e19c69ebb974886991d5dad9f632f81","complete":false,"records":13861,"lastAttemptAt":"2026-11-19T09:50:13.3657605+00:00","lastSuccessAt":"2026-11-19T09:50:12.338+00:00","error":"272 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-19T09:50:12.338+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13636,"expectedIdentifiers":13908,"failedIdentifiers":272},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-19T09:40:31.8345493+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-19T09:40:31.8345493+00:00","lastSuccessAt":"2026-11-19T09:40:32.3815873+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:32.3815895+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-8b5fdf678977402cb60bbe3c5e89bf16","complete":true,"records":13873,"lastAttemptAt":"2026-11-19T09:40:33.0523055+00:00","lastSuccessAt":"2026-11-19T09:22:49.229+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:22:49.229+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13908,"expectedIdentifiers":13908,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-76574c95b6792d47ba90af64983ed5843633f14426346d676016e94a5f383202","complete":true,"records":9963,"lastAttemptAt":"2026-11-19T09:40:25.2441782+00:00","lastSuccessAt":"2026-11-19T01:24:31.4213722+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:25.2441782+00:00","snapshotPublishedAt":"2026-11-19T01:03:15+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-19T09:40:24.3875329+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:24.3875329+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-313d8afdba3867de110bc2f0cc252c7b787cb94e08a055d09b0542017e147ca8","complete":true,"records":3194,"lastAttemptAt":"2026-11-19T09:40:31.7231448+00:00","lastSuccessAt":"2026-11-19T09:40:31.5988269+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:31.7231448+00:00","snapshotPublishedAt":"2026-11-19T09:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-151b9ac741fba7353ad731a68476d546237cc5b2becb54fa011ca91249746bea","complete":true,"records":232733,"lastAttemptAt":"2026-11-19T09:40:24.5744302+00:00","lastSuccessAt":"2026-11-19T08:24:21.1829126+00:00","error":null,"lastVerifiedAt":"2026-11-19T09:40:24.5744302+00:00","snapshotPublishedAt":"2026-11-19T07:32:56+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}