<?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/"><channel><title>Sanitization — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/sanitization/</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>Thu, 14 May 2026 18:27:07 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/sanitization/feed.xml" rel="self" type="application/rss+xml"/><item><title>sanitize-html XSS Vulnerability via XMP Tag Bypass (CVE-2026-44990)</title><link>https://feed.craftedsignal.io/briefs/2026-05-sanitize-html-xss/</link><pubDate>Thu, 14 May 2026 18:27:07 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-sanitize-html-xss/</guid><description>sanitize-html version 2.17.3 and earlier is vulnerable to cross-site scripting (XSS) due to the improper handling of the `xmp` tag, allowing attackers to inject arbitrary HTML and JavaScript code.</description><content:encoded><![CDATA[<p>The <code>sanitize-html</code> library, a widely used HTML sanitizer for Node.js, contains a critical cross-site scripting (XSS) vulnerability (CVE-2026-44990) affecting version 2.17.3 and earlier. The vulnerability arises from the omission of the <code>xmp</code> tag from the default <code>nonTextTags</code> list in the library&rsquo;s configuration. This oversight, combined with the special handling of <code>xmp</code> content in the <code>ontext</code> handler, allows attacker-controlled content within a disallowed <code>xmp</code> element to be rendered as live HTML or JavaScript. The issue was identified and disclosed on May 14, 2026. Exploitation can lead to arbitrary JavaScript execution in a user&rsquo;s browser, impacting applications that rely on <code>sanitize-html</code> for input sanitization.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker crafts malicious HTML containing JavaScript code wrapped within an <code>&lt;xmp&gt;</code> tag (e.g., <code>&lt;xmp&gt;&lt;script&gt;alert(1)&lt;/script&gt;&lt;/xmp&gt;</code>).</li>
<li>The application utilizes <code>sanitize-html</code> version 2.17.3 or earlier with default settings to sanitize the malicious HTML.</li>
<li>Due to the omission of <code>xmp</code> from the <code>nonTextTags</code> list, <code>sanitize-html</code> does not treat the <code>xmp</code> tag as a container to be completely discarded.</li>
<li>The <code>ontext</code> handler in <code>sanitize-html</code> appends the content within the <code>xmp</code> tag directly to the output without proper escaping.</li>
<li>The sanitized output, still containing the unescaped JavaScript code from within the <code>&lt;xmp&gt;</code> tag, is stored in the application&rsquo;s database or displayed to other users.</li>
<li>When a user views the stored or displayed content, the browser renders the unescaped JavaScript code within the now-live HTML structure.</li>
<li>The attacker&rsquo;s JavaScript code executes in the user&rsquo;s browser, potentially stealing sensitive information, performing actions on behalf of the user, or defacing the application.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This XSS vulnerability allows a remote attacker to inject arbitrary JavaScript into a user&rsquo;s browser. Successful exploitation can lead to session hijacking, sensitive data theft, account takeover, and defacement of the application. Applications that rely on <code>sanitize-html</code> for input sanitization and render the output as trusted HTML are vulnerable. The severity is rated as critical due to the ease of exploitation and potential impact.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>sanitize-html</code> version 2.18.0 or later, where this vulnerability is resolved.</li>
<li>As a temporary workaround, configure <code>sanitize-html</code> to explicitly disallow the <code>xmp</code> tag or to escape its content.</li>
<li>Deploy the Sigma rule <code>Detect sanitize-html XSS via XMP Tag Bypass</code> to identify exploitation attempts (process_creation).</li>
<li>Review and update any existing sanitization configurations to ensure that potentially dangerous tags are properly handled.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>xss</category><category>sanitize-html</category><category>javascript</category><category>sanitization</category></item></channel></rss>