Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to intelligence
open-source-dependency-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory

DOMPurify Flaws Enable XSS Bypass Through ADD_ATTR and Prototype Pollution

Updated 3mo agoFirst seen Apr 3, 20262 sources

Two newly disclosed flaws in DOMPurify can let attackers bypass the library’s sanitization logic and inject malicious attributes or unsafe URLs into supposedly cleaned HTML. One issue, tracked as GHSA-CJMM-F4JC-QW8R, affects deployments that use a predicate function with the ADD_ATTR configuration. If that predicate approves URI-bearing attributes such as href or src, DOMPurify can skip later mandatory safety checks, including protocol validation, allowing dangerous values such as javascript:, vbscript:, or data: to pass through and potentially trigger DOM-based cross-site scripting.

A second flaw, GHSA-CJ63-JHHR-WCXV, stems from prototype pollution when the USE_PROFILES option is enabled. In vulnerable versions, DOMPurify initializes ALLOWED_ATTR as a standard JavaScript array, allowing inherited properties from Array.prototype to influence attribute validation. An attacker able to pollute Array.prototype with entries such as onclick can cause DOMPurify to treat malicious event-handler attributes as explicitly allowed, creating another path to XSS. Together, the disclosures show that applications relying on DOMPurify may remain exposed if they use dynamic attribute approval or operate in environments where prototype pollution is possible.

Share:
DOMPurify Flaws Enable XSS Bypass Through ADD_ATTR and Prototype Pollution
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

1 event from the most recent confirmed update back to the earliest known activity.

1 EVENTS
Apr 3, 20263mo ago

DOMPurify XSS bypass flaws are publicly disclosed

Two DOMPurify vulnerabilities were publicly disclosed: a logical flaw in ADD_ATTR predicate handling that can skip mandatory URI safety checks, and a prototype pollution issue in USE_PROFILES that can let polluted Array.prototype properties bypass attribute filtering. Both issues could allow malicious attributes or dangerous protocols to survive sanitization and lead to cross-site scripting.

The operational view lives in Mallory

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t — which of your assets are affected, which threat actors are using it right now, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.