<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Xmldom (&lt;= 0.6.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/xmldom--0.6.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 09 Sep 2026 03:48:50 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/xmldom--0.6.0/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Attribute Injection in @xmldom/xmldom via Element.setAttribute</title><link>https://feed.craftedsignal.io/briefs/2026-09-xmldom-attribute-injection/</link><pubDate>Wed, 09 Sep 2026 03:48:50 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-xmldom-attribute-injection/</guid><description>The @xmldom/xmldom library fails to validate attribute names during the use of Element.setAttribute, allowing attackers to inject malicious attributes into serialized XML output leading to potential XSS.</description><content:encoded><![CDATA[<p>The @xmldom/xmldom library (CVE-2026-83605) contains an attribute injection vulnerability arising from inconsistent validation between its APIs. While the public <code>Document.createAttribute()</code> method correctly validates attribute names against the XML <code>QName</code> production, the commonly used <code>Element.setAttribute()</code> method calls a private <code>_createAttribute()</code> helper that performs no validation.</p>
<p>The vulnerability allows an attacker to inject characters - such as quotes and spaces - into the attribute name parameter of <code>setAttribute()</code>, effectively terminating the intended attribute and injecting new ones (e.g., <code>onclick</code> event handlers) into the document tree. Because the library's <code>XMLSerializer</code> performs no validation by default, these injected attributes are rendered verbatim in the output. If this output is subsequently parsed by a browser, it can result in Cross-Site Scripting (XSS) or the overriding of security-critical attributes like <code>integrity</code> or <code>Content-Security-Policy</code>. This vulnerability affects versions of <code>@xmldom/xmldom</code> from 0.7.0 through 0.9.10, as well as the legacy <code>xmldom</code> package (&lt;= 0.6.0).</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for arbitrary attribute injection when user-supplied input is reflected in attribute names. This poses a significant risk to web applications using this library to process or generate XML/HTML, as it can lead to XSS, bypass of security constraints, or unauthorized execution of JavaScript if the resulting XML is rendered as HTML in a browser context.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>@xmldom/xmldom</code> version 0.9.11 or 0.8.14 or later to access the new validation features.</li>
<li>Implement the <code>requireWellFormed: true</code> option in all <code>XMLSerializer.serializeToString()</code> calls that process untrusted or partially user-controlled DOM content.</li>
<li>Perform an audit of the codebase to identify all locations where user-provided strings are passed as the 'name' parameter to <code>setAttribute()</code>.</li>
<li>Validate all attribute names against the XML <code>QName</code> production before calling <code>setAttribute()</code> if the library cannot be updated or if strict serialization cannot be enabled.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>xss</category><category>injection</category><category>vulnerability</category><category>web-application</category></item><item><title>xmldom requireWellFormed Serialization Bypass</title><link>https://feed.craftedsignal.io/briefs/2026-09-xmldom-injection-bypass/</link><pubDate>Tue, 08 Sep 2026 21:50:46 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-xmldom-injection-bypass/</guid><description>The xmldom serializer fails to properly validate element and attribute names when the requireWellFormed option is enabled, allowing attackers to inject arbitrary markup via line-terminated strings.</description><content:encoded><![CDATA[<p>The xmldom package is vulnerable to a security bypass affecting the <code>requireWellFormed</code> option in <code>XMLSerializer</code>. The issue stems from the use of a regular expression compiled with the <code>m</code> (multiline) flag to validate XML element and attribute names. Under these conditions, the <code>$</code> anchor matches line terminators rather than the end of the entire string. Consequently, the validator only verifies that the first line of an element or attribute name is well-formed, allowing any content following a line terminator (U+000A, U+000D, U+2028, or U+2029) to be serialized verbatim.</p>
<p>This vulnerability impacts applications that rely on the <code>requireWellFormed: true</code> option as a defense against name-injection attacks, such as those identified in GHSA-w2rr-34g9-rvrj and GHSA-4w3w-2rp5-g8jm. Attackers capable of influencing element or attribute names during programmatic DOM construction can bypass these safety checks to inject arbitrary XML or HTML. If the resulting output is rendered in a browser, this injection can lead to Cross-Site Scripting (XSS).</p>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows for the bypass of previously implemented security mitigations for XML name injection. Successful exploitation enables the injection of arbitrary markup into serialized XML strings. When these strings are rendered in web contexts, attackers can achieve Cross-Site Scripting (XSS), potentially leading to unauthorized data access, session hijacking, or other client-side malicious activity. This affects all downstream applications that trust <code>xmldom</code> to sanitize output through the <code>requireWellFormed</code> serializer option.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>xmldom</code> dependency to a version that patches CVE-2026-83617.</li>
<li>Audit all application codebases for instances of <code>XMLSerializer.serializeToString()</code> that utilize the <code>{ requireWellFormed: true }</code> option to ensure they are updated to the corrected library version.</li>
<li>For applications handling untrusted user input, implement server-side validation of element and attribute names before DOM construction to ensure they strictly conform to XML QName specifications.</li>
<li>Ensure that serialized output containing user-controlled data is properly escaped or sanitized before rendering it in browser-based contexts to mitigate residual XSS risks.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>injection</category><category>xss</category><category>library-vulnerability</category></item><item><title>XML Injection Vulnerability in @xmldom/xmldom via Processing Instruction Targets</title><link>https://feed.craftedsignal.io/briefs/2026-09-xmldom-injection/</link><pubDate>Tue, 08 Sep 2026 21:50:39 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-xmldom-injection/</guid><description>The @xmldom/xmldom library fails to validate the target parameter in createProcessingInstruction, enabling attackers to break out of XML processing instructions and inject arbitrary content when serializing with the requireWellFormed flag.</description><content:encoded><![CDATA[<p>The @xmldom/xmldom library is susceptible to an XML injection vulnerability (CVE-2026-83616) due to insufficient validation of the target parameter in the <code>Document.createProcessingInstruction()</code> method. When developers use the <code>requireWellFormed: true</code> option in <code>XMLSerializer.serializeToString()</code>, the library fails to properly sanitize the processing instruction (PI) target. Specifically, it does not check for the <code>&gt;</code> character, which prematurely terminates the processing instruction (<code>&lt;?target data?&gt;</code>).</p>
<p>An attacker controlling the input to the target parameter can inject arbitrary XML elements, including <code>&lt;script&gt;</code> tags, into the serialized output. If this output is subsequently served as XHTML or processed by a downstream XML parser, it may lead to Cross-Site Scripting (XSS) or XML External Entity (XXE) injection attacks. The protection is not enabled by default, requiring developers to explicitly opt-in to the <code>requireWellFormed</code> mode, which remains incomplete in its validation logic across various versions of the library.</p>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for the injection of arbitrary XML structure, leading to potential XSS in browser-based applications and XXE vulnerabilities in backend XML parsers. Impact is localized to applications that generate XML dynamically using user-provided data without sufficient secondary validation.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a non-vulnerable version of @xmldom/xmldom as soon as updates are available.</li>
<li>Audit all <code>serializeToString()</code> call sites to ensure <code>requireWellFormed: true</code> is explicitly enabled for any serialization of untrusted or user-influenced DOM content.</li>
<li>Implement strict input validation on any string used as a processing instruction target, ensuring it conforms strictly to the XML <code>NCName</code> production (no colons, whitespace, or XML-reserved characters like <code>&gt;</code> or <code>?</code>).</li>
<li>Do not rely on <code>requireWellFormed: true</code> as the sole mitigation for untrusted input, as it is an opt-in configuration that may not catch all malicious injection vectors.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>injection</category><category>xss</category><category>xxe</category><category>vulnerability</category></item></channel></rss>