CVE-2026-144958: Masterminds html5-php before 2.12.0 CPU Exhaustion via Parse-Error Position Tracking

Published Dec 4, 2026
·
Updated

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.

Other sources

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.

— NVD

Masterminds html5-php before 2.12.0 contains a denial of service vulnerability that allows remote attackers to exhaust CPU through quadratic parse-error position tracking in Tokenizer::parseError. Attackers can submit small HTML documents with repeated '&;' sequences that trigger full-buffer rescans in Scanner::currentLine and Scanner::columnOffset, consuming seconds of CPU per document.

— OSV

Affected Software

1 affected component
composer/masterminds/html5<2.12.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.12.0

Event History

Dec 4, 2026
CVE Published
via OSV·02:42 PM
Data Sourced
via OSV·02:42 PM
DescriptionSeverityWeakness
Event
via OSV·02:42 PM
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which versions should be treated as affected?

Versions of composer/masterminds/html5-php before 2.12.0 are affected. Version 2.12.0 is identified as the fixed release.

2

What conditions are required for exploitation?

An attacker must be able to supply HTML containing an xmlns:* namespace declaration whose value includes a double quote. The supplied HTML must then be processed by a DOM-walking sanitizer and re-serialized with saveHTML.

3

What can be done while upgrading is not immediately possible?

Do not allow untrusted HTML with attacker-controlled xmlns:* namespace declaration values to reach the affected sanitization and saveHTML re-serialization path. Prioritize controlling HTML inputs processed by that path until the dependency can be updated.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203