PHP Patches 20-Year-Old Flaw That Silently Disables TLS Encryption
The PHP project released security updates including 8.5.13, fixing CVE-2026-128064 (CVSS 8.2), a high-severity flaw in HTTP/FTP stream wrappers. Inconsistent case handling of URL schemes lets HTTPS:// or httpS:// bypass TLS and fall back to plaintext, exposing credentials, cookies and POST data. The bug traces back to PHP 4.3.0, lurking for nearly 20 years.
Related Entities
Full Report
IT之家 November 20 news: On November 19 local time, the PHP project team released security update 8.5.13, fixing a total of 18 CVE vulnerabilities, 4 of which can lead to remote code execution.
According to the introduction, its HTTP and FTP stream wrappers contain a security vulnerability that may cause HTTPS and FTPS requests to be unexpectedly downgraded to plaintext transmission, numbered CVE-2026-128064, with a CVSS 4.0 score of 8.2 (high severity).

According to the official PHP announcement, the issue stems from inconsistent case handling of URL schemes: the stream wrapper recognizes protocol names case-insensitively, but when enabling TLS it only checks for a lowercase letter s at a fixed position. Therefore, forms such as HTTPS://, httpS://, and FTPS:// may bypass the expected encrypted transmission.
This means the problem is not limited to directly passed URLs. If a PHP application initiates requests through stream functions such as file_get_contents() and fopen(), or automatically follows HTTP redirects, the vulnerability may also be triggered. For example, after a server receives a normal HTTPS request, if the other party redirects the request to an HTTPS:// address via an HTTP 307 redirect, the originally preserved POST request body and authentication information may also be transmitted over an unencrypted connection.

According to the official PHP announcement, an attacker needs to be able to observe the relevant network traffic in order to obtain the leaked data. Potentially exposed information includes Basic authentication credentials, Bearer Tokens, Cookies, sensitive POST data, FTP login credentials, and the contents of transmitted files.
The official PHP announcement states that, according to code inspection results, applications directly passing mixed-case protocol names have been affected since PHP 5.2.0; cases of redirecting to such addresses can be traced back to PHP 4.3.0. This means the relevant code issue has existed for nearly 20 years.

The PHP project team released a security update on November 19, with fixed versions including PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0.
IT之家 note: For users still using PHP 8.1 and earlier versions, because these branches have reached end of upstream life, the PHP project will no longer provide corresponding regular security fixes.
As a temporary mitigation measure, it is recommended to uniformly convert protocol names such as HTTPS and FTPS to lowercase before passing URLs to stream functions; if automatic following of HTTP redirects is allowed, redirect targets should also be validated and normalized one by one. Handling only the initial URL is not enough to avoid the risk.