Article title: A PHP vulnerability has existed for nearly 20 years: using an uppercase S in httpS can cause TLS encryption to fail, now fixed
Body:
A PHP vulnerability has existed for nearly 20 years: using an uppercase S in httpS can cause TLS encryption to fail, now fixed
IT之家 November 20 news, on November 19 local time, the PHP project team released the 8.5.13 security update, 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 have 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 identifies protocol names case-insensitively, but when enabling TLS it only checks for a lowercase 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, based on 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 the 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 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 verified and normalized one by one. Handling only the initial URL is not enough to avoid the risk.
Related articles
- U.S. CISA confirms hackers have exploited a high-severity PHP vulnerability in attacks, requiring federal civilian agencies to complete system remediation within 3 days
- Due to security risks in the backend PHP program, online features for Capcom's "Street Fighter 5" PS4 and Steam versions have been fully suspended
- After cyberattacks, multiple Japanese companies begin paying compensation to users
- PHP Foundation负责人坦言资金不足:仅 1 名全职员工
- Cybersecurity "invisible cornerstone" upgraded: OpenSSL 4.1 released, making real-time audio/video and game transmission more secure
- Affected by the PHP vulnerability, the official Sonos speaker app has suspended services for NetEase Cloud Music, QQ Music, Kugou Music, and Kuwo Music in China