CVE-2026-144957: 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.

— OSV

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.

— MITRE

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
CVE Published
via MITRE·02:42 PM
Data Sourced
via MITRE·02:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness
Event
via NVD·03:17 PM

Frequently Asked Questions

1

Which deployments are exposed to remote exploitation?

Deployments that use the affected library to parse attacker-controlled HTML are exposed. An unauthenticated remote attacker can submit crafted input, so no privileges or user interaction are required.

2

What input triggers the CPU exhaustion?

Small HTML documents containing repeated "&;" sequences can trigger parse errors that cause full-buffer rescans for line and column tracking. The resulting quadratic processing can consume seconds of CPU for a single document.

3

Are confidentiality or integrity affected?

The provided severity vector indicates availability impact only. It lists no confidentiality or integrity impact.

4

What version addresses the issue?

Version 2.12.0 is the stated fixed release. Versions before 2.12.0 are affected.

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