PHP 8.1-8.4 DOM/SimpleXML Charset Header Bypass on Redirect
CVE-2025-1219 Published on March 30, 2025
libxml streams use wrong content-type header when requesting a redirected resource
In PHP from 8.1.* before 8.1.32, from 8.2.* before 8.2.28, from 8.3.* before 8.3.19, from 8.4.* before 8.4.5, when requesting a HTTP resource using the DOM or SimpleXML extensions, the wrong content-type header is used to determine the charset when the requested resource performs a redirect. This may cause the resulting document to be parsed incorrectly or bypass validations.
Weakness Type
Inaccurate Comments
The source code contains comments that do not accurately describe or explain aspects of the portion of the code with which the comment is associated.
Products Associated with CVE-2025-1219
stack.watch emails you whenever new vulnerabilities are published in PHP or Canonical Ubuntu Linux. Just hit a watch button to start following.
Affected Versions
PHP Group PHP:- Version 8.1.* and below 8.1.32 is affected.
- Version 8.2.* and below 8.2.28 is affected.
- Version 8.3.* and below 8.3.19 is affected.
- Version 8.4.* and below 8.4.5 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.