CVE-2025-1217 in PHPinfo

Summary

by MITRE • 03/29/2025

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 http request module parses HTTP response obtained from a server, folded headers are parsed incorrectly, which may lead to misinterpreting the response and using incorrect headers, MIME types, etc.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 02/11/2026

This vulnerability affects PHP versions across multiple release lines including 8.1.x before 8.1.32, 8.2.x before 8.2.28, 8.3.x before 8.3.19, and 8.4.x before 8.4.5. The issue resides within the HTTP request module's handling of folded headers during HTTP response parsing. Folded headers occur when a header value spans multiple lines in an HTTP response, typically using line continuation where subsequent lines begin with whitespace characters. The vulnerability stems from improper parsing logic that fails to correctly interpret these folded header sequences, leading to potential header misinterpretation and incorrect processing of HTTP responses.

The technical flaw manifests when PHP's HTTP client component encounters HTTP responses containing folded headers. During parsing, the module incorrectly processes the header continuation lines, potentially causing header values to be truncated, merged, or misinterpreted. This misinterpretation can affect critical aspects of HTTP response handling including content type detection, security header validation, and proper MIME type assignment. The vulnerability represents a parsing error that falls under CWE-1294, which specifically addresses incorrect handling of folded headers in HTTP responses, and may also relate to CWE-1295 concerning improper handling of HTTP protocol elements.

The operational impact of this vulnerability extends across multiple security domains and application behaviors. Applications relying on PHP's HTTP client functionality may experience incorrect MIME type detection, leading to improper content handling or potential security bypasses. Security headers such as content security policy directives, cross-origin resource sharing controls, or authentication tokens could be misinterpreted, potentially weakening application security posture. Additionally, the incorrect header processing might cause applications to make decisions based on malformed or incomplete header information, potentially leading to unexpected behavior or exploitation opportunities. This vulnerability aligns with ATT&CK technique T1071.004 for application layer protocol manipulation and could contribute to broader attack chains involving HTTP response manipulation.

Organizations should prioritize immediate patching of affected PHP installations across all supported versions to address this vulnerability. The recommended mitigation strategy involves upgrading to the latest stable releases within each affected major version line, specifically PHP 8.1.32, 8.2.28, 8.3.19, and 8.4.5. System administrators should also implement monitoring for unusual HTTP response handling patterns and consider validating header values in critical application components. Additional defensive measures include implementing proper HTTP response validation in application code, particularly for security-sensitive header processing, and ensuring that applications do not rely solely on potentially malformed header data for critical security decisions. Regular security assessments of HTTP client implementations and comprehensive testing of header parsing logic should be conducted to identify and remediate similar vulnerabilities in custom or third-party components.

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!