Skip to main content

Masterminds html5-php CVE-2026-144957

| EUVDEUVD-2026-144256 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-12-04 VulnCheck GHSA-q235-vh3c-vxg7
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send small HTML with repeated '&;' to parsing endpoint
  2. Exploit
    Trigger per-error full-buffer rescans (O(n²) position tracking)
  3. Impact
    Exhaust worker CPU and degrade service availability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires an application that passes untrusted/attacker-supplied HTML to masterminds/html5-php version 2.11.0 or earlier for parsing; the quadratic parse-error position tracking in Scanner::currentLine/columnOffset is always active and no option disables it, so default configurations are affected. The specific trigger is input that produces many parse errors per byte, such as repeated '&;' entity-like sequences. The main limiting factor is that CPU consumption per request is bounded by PHP's max_execution_time, so a single request cannot run indefinitely; meaningful denial of service therefore depends on the attacker sending a volume of such requests, and on the application exposing an HTML-parsing endpoint to untrusted input.

Impact

The signals align on a genuine but bounded availability risk rather than a top-tier emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms the flaw is reachable remotely, with no authentication, no user interaction, and no special attack requirements - so any endpoint that feeds attacker-controlled HTML to masterminds/html5-php <= 2.11.0 is exposed. However, the only impact metric set is VA:L (low availability, with VC/VI/VA confidentiality and integrity all N), which caps the score at 6.9 (medium): this is pure CPU exhaustion (CWE-407 algorithmic complexity), not code execution or data compromise. No EPSS score and no KEV listing were provided, and there is no confirmed public exploit code, though the GHSA advisory documents the trigger concretely (160 KB of repeated '&;' costs ~10.5s CPU vs ~0s for benign text). The vuln.today decision label is 'this_month', consistent with a medium-severity DoS that warrants scheduled patching rather than emergency response. A key mitigating factor noted by the vendor is that per-request damage is bounded by PHP's max_execution_time, so impact is amplification/resource-waste rather than permanent outage. Net: a real, low-cost-to-trigger priority for internet-facing HTML-parsing services, but not a drop-everything issue absent any active-exploitation signal.

Exploit ScenarioDerived

An attacker repeatedly POSTs small HTML documents containing many repeated '&;' sequences to any web endpoint that parses user-supplied HTML with masterminds/html5-php (e.g. a comment, profile, or feed importer). Each document forces full-buffer rescans in Scanner::currentLine and Scanner::columnOffset for every parse error, burning seconds of CPU per request; a flood of such requests exhausts worker CPU and degrades or denies service. No public exploit code is identified, but the advisory describes the triggering input and its cost precisely.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 04, 2026

Parsing attacker-supplied HTML with masterminds/html5-php 2.11.0 or earlier can burn seconds of CPU per small document, because every recorded parse error re-derives the line and column by rescanning the buffer from the start, making position bookkeeping quadratic in input length. The trigger is input that generates many parse errors per byte - repeated '&;' sequences being the documented example - and no configuration option disables the behavior, so default deployments that expose an HTML-parsing endpoint to untrusted input are exposed to unauthenticated remote attackers (CVSS 4.0 6.9, PR:N). Availability impact per request is bounded by PHP's max_execution_time, so meaningful denial of service depends on request volume; no public exploit code was identified at time of analysis, and the vendor shipped 2.12.0 with incremental line/column tracking.

RemediationAI

Upgrade to the vendor-released fix version 2.12.0 (Composer: masterminds/html5 2.12.0), which replaces the full-buffer rescans in Scanner::currentLine and Scanner::columnOffset with incremental cached line/column tracking, as described in advisory GHSA-pj59-fvjc-74pp and delivered by commit c99252152ca8b1bdc821181d17a1f2c98e9fba1b; the release is published at https://github.com/Masterminds/html5-php/releases/tag/2.12.0. The vendor explicitly notes that no option disables the quadratic behavior in affected versions, so the only complete fix is upgrading. If upgrading is temporarily not possible, the vendor's stated workaround is to cap input size before parsing - reject or truncate HTML payloads above a conservative byte limit so the O(n^2) rescan cannot reach expensive sizes; the trade-off is that legitimately large documents will be rejected or lose content, so the limit must be chosen against real traffic. Keeping PHP's max_execution_time in place bounds CPU per request but does not prevent an attacker from consuming worker capacity through repeated requests, and reducing it lowers the ceiling while risking aborted legitimate parses. Because the trigger produces heavy malformed-input parse-error volume, rate limiting or front-end request throttling on HTML-consuming endpoints reduces aggregate exposure but does not remove the underlying defect.

Affected VersionsENISA

html5-php 0 <2.12.0

Affected Packages

euvd html5_php fix: 2.12.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is an algorithmic-complexity defect (CWE-407) in the PHP parser's Scanner class. Tokenizer::parseError records diagnostics that call Scanner::currentLine and Scanner::columnOffset, and in 2.11.0 those methods recomputed the position by scanning $this->data from offset 0 (substr_count over the full prefix for the line, strrpos plus a substring slice for the column) on every single error. Cost therefore scales with the number of errors multiplied by the distance from the start of the buffer: a 160 KB document consisting of repeated '&;' sequences costs roughly 10.5 seconds of CPU while 160 KB of benign text costs approximately zero, since benign markup produces almost no parse errors. The vendor's fix (commit c99252152ca8b1bdc821181d17a1f2c98e9fba1b, released as 2.12.0) introduces cached posChar/posLine/posColumn state and an advancePosition() helper that moves the cached position forward incrementally, resetting only when an unconsumed offset moves backwards. The same advisory bundles three unrelated fixes - escaping of xmlns:* values on serialization, handling of a failed loadXML when xmlNamespaces=true, and replacement of invalid UTF-8 with U+FFFD instead of deletion - but CVE-2026-144957 corresponds to the quadratic parse-error tracking item only. The trigger is a small, syntactically malformed HTML document; the specific mechanism beyond 'many errors per byte' is described in the advisory, and per-request impact is capped by PHP's max_execution_time.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Remotely reachable, unauthenticated, no interaction (AV:N/AC:L/PR:N/UI:N); impact is only partial CPU exhaustion bounded by max_execution_time, so A:L and C/I:N.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

Prevalence
High
widely-used PHP HTML5 parser library, dependency of Drupal and many PHP apps
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy