Improper Encoding or Escaping of Output Affecting xhtml-purifier package, versions <0.4.3


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.18% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-XHTMLPURIFIER-21694027
  • published24 Oct 2026
  • disclosed24 Sept 2026
  • creditUnknown

Introduced: 24 Sep 2026

CVE-2026-61784  (opens in a new tab)
CWE-116  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade xhtml-purifier to version 0.4.3 or higher.

Overview

xhtml-purifier is a Simple HTML purifier/cleaner for untrusted HTML.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via the attributeString() function in XHTMLPurifier.js, which writes attribute values into double-quoted HTML attributes without entity-encoding them. An attacker who controls an attribute value containing a double-quote character can break out of the quoted attribute context and inject arbitrary additional attributes, including event handlers such as onmouseover, which execute when the purified output is rendered in a browser.

CVSS Base Scores

version 4.0
version 3.1