Read the docs
TI-2026-44227 Aliases CVE-2026-61784GHSA-j8r4-32c5-33rc

xhtml-purifier has HTML attribute-injection (sanitizer bypass) that leads to XSS

Priority LOW 26CWE-116Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

xhtml-purifier is a Node.js library to take in raw/unknown/untrusted HTML and output cleaned, purified, trusted HTML. Versions prior to 0.4.3 do not HTML-entity-encode attribute values when serializing its sanitized output. In attributeString() (XHTMLPurifier.js, around line 148) the attribute value is concatenated directly into a double-quoted attribute without encoding. As a result, an attacker-controlled value in any allowed attribute (class, style, title, alt, src, href) can include a double-quote character to break out of the attribute and inject an additional attribute, such as a JavaScript event handler (for example onmouseover or onerror). The injected handler survives sanitization and executes when the output is rendered, which is a sanitizer bypass leading to cross-site scripting. The fix in version 0.4.3 HTML-entity-encodes attribute values before serialization.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00178 7th percentileScored 2026-11-07
Fix Fixed node-xhtml-purifier (cstigler): 0.4.3xhtml-purifier (npm): 0.4.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
cstiglernode-xhtml-purifierbefore 0.4.30.4.3Patch availableCNA
—xhtml-purifier (npm)before 0.4.30.4.3Patch availableGHSA-j8r4-32c5-33rc
  • node-xhtml-purifier Vendorcstigler Affected before 0.4.3 Fixed in 0.4.3 Patch available CNA
  • xhtml-purifier (npm) Vendor— Affected before 0.4.3 Fixed in 0.4.3 Patch available GHSA-j8r4-32c5-33rc

Remediation

  • Fix · CNA node-xhtml-purifier (cstigler) Fixed in 0.4.3
  • Fix · GHSA-j8r4-32c5-33rc xhtml-purifier (npm) Fixed in 0.4.3 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-61784
  2. 2026-10-03 Alias added: GHSA-j8r4-32c5-33rc

References

Sources