Masterminds html5-php before 2.12.0 XSS via Unescaped xmlns Attribute Serialization
- CVE-2026-144958
- EUVD-2026-144255
Summary
Masterminds html5-php versions before 2.12.0 contain a cross-site scripting vulnerability in the OutputRules::namespaceAttrs function. This function writes xmlns:* namespace declaration values into double-quoted attributes without escaping them. An attacker can supply HTML with an xmlns:x value that includes a double quote, which can bypass DOM-walking sanitizers and inject script into output that is re-serialized with saveHTML. The record rates the issue at CVSS 4.7 and states it is not on the CISA known exploited vulnerabilities list. Engineers using this library to sanitize or re-serialize untrusted HTML should consider upgrading to version 2.12.0 or later.
AI summary · verify against the vendor advisory
Description
Masterminds html5-php before 2.12.0 contains a cross-site scripting vulnerability in OutputRules::namespaceAttrs, which writes xmlns:* namespace declaration values into double-quoted attributes without escaping. Attackers can supply HTML with an xmlns:x value containing a double quote to bypass DOM-walking sanitizers and inject script into output re-serialized with saveHTML.
Text from the CVE.org record.
Recommendation
Masterminds html5-php
- If you run a version before 2.12.0update to 2.12.0 or later
Taken from the version ranges of the CVE.org record. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Masterminds html5-php
Affected versions Fixed in before 2.12.0 2.12.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.