# CVE-2026-144959: Masterminds html5-php before 2.12.0 Filter Bypass XSS via Invalid UTF-8 Removal

Source: https://aplosec.si/cve/CVE-2026-144959/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-144959

Low 2.3 · Reported · Fixed in 2.12.0 · CWE-182 · Packagist

# Masterminds html5-php before 2.12.0 Filter Bypass XSS via Invalid UTF-8 Removal

CVE-2026-144959 · published 2026-12-04

In plain words: this type of bug lets two parts of a system read the same input differently, so a check can be slipped past (parsing mismatch). A fixed release is listed.

## Summary

CVE-2026-144959 affects html5-php (Packagist) < 2.12.0: Filter Bypass XSS via Invalid UTF-8 Removal (CWE-182). Fixed in 2.12.0. CVSS 4.0 base score 2.3 (Low), assigned by VulnCheck. Published 2026-12-04 by VulnCheck. Credit: Zachariah Mithani (AploSec).

Masterminds html5-php before 2.12.0 contains a cross-site scripting vulnerability because UTF8Utils::convertToUTF8 deletes invalid UTF-8 bytes instead of replacing them with U+FFFD. Attackers can split tokens like <scr\xFFipt> with bytes such as 0xFF to evade raw-byte tag filters and inject script elements into rendered output.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

Upgrade html5-php to 2.12.0 or later. Releases in the affected range (< 2.12.0) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-12-04 CVE published

## References

- [Referencehttps://github.com/Masterminds/html5-php/security/advisories/GHSA-pj59-fvjc-74pp](https://github.com/Masterminds/html5-php/security/advisories/GHSA-pj59-fvjc-74pp)

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/masterminds-html5-php-before-2.12.0-filter-bypass-xss-via-invalid-utf-8-removal](https://www.vulncheck.com/advisories/masterminds-html5-php-before-2.12.0-filter-bypass-xss-via-invalid-utf-8-removal)

- [Fix commithttps://github.com/Masterminds/html5-php/commit/c99252152ca8b1bdc821181d17a1f2c98e9fba1b](https://github.com/Masterminds/html5-php/commit/c99252152ca8b1bdc821181d17a1f2c98e9fba1b)

- [Releasehttps://github.com/Masterminds/html5-php/releases/tag/2.12.0](https://github.com/Masterminds/html5-php/releases/tag/2.12.0)

- [Vulnerable codehttps://github.com/Masterminds/html5-php/blob/2.11.0/src/HTML5/Parser/UTF8Utils.php#L90-L105](https://github.com/Masterminds/html5-php/blob/2.11.0/src/HTML5/Parser/UTF8Utils.php#L90-L105)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-144959](https://www.cve.org/CVERecord?id=CVE-2026-144959)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-144959](https://nvd.nist.gov/vuln/detail/CVE-2026-144959)

**Severity:** Low 2.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-144959)

**Package:** html5-php

**Ecosystem:** Packagist

**Affected:** < 2.12.0

**Fixed:** 2.12.0

**Weakness:** CWE-182

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
