NewsCrawler.org

PHP sent data unencrypted for URLs with an uppercase S in the scheme, now fixed

PHP sent data unencrypted for URLs with an uppercase S in the scheme, now fixed
PHP sent data unencrypted for URLs with an uppercase S in the scheme, now fixed
Image: forest.watch.impress.co.jp

A security update for PHP released on 19 November 2026 fixed a flaw that had gone unnoticed for more than 20 years. If a URL passed to functions such as file_get_contents() has an uppercase S in its scheme, such as HTTPS:// or httpS://, PHP sent the data without encryption. Tokens, passwords, POST data and files could travel over the network in plain text.

According to the GitHub advisory, the HTTP and FTP stream wrappers[1] accept the URL scheme in any letter case, but decide whether to use TLS[2] by checking for a lowercase s in a fixed position, so uppercase letters were missed. The flaw is tracked as CVE-2026-128064[3] and rated High, the second of four severity levels. Exploitation requires a URL with uppercase letters to reach a stream wrapper and an attacker who can observe the traffic, and passwords and authentication tokens may leak. Redirects are affected too: a 307 redirect from an HTTPS connection to an uppercase HTTPS:// URL sends POST data and authentication headers in plain text.

Fixed versions are 8.6.0, 8.5.13, 8.4.28, 8.3.37 and 8.2.36. Until an update is possible, the advisory suggests lowercasing the scheme before passing the URL to stream functions, or disabling automatic redirects and validating and normalizing the redirect target. The article notes that the URL behaviour dates back to PHP 5.2.0, released in November 2006, and the redirect behaviour to PHP 4.3.0, released in December 2002.

Repository PHP github.com

Stars: 4,134Forks: 2,041License: MITUpdated:

Read the original forest.watch.impress.co.jp

Sources

  • Mado no Mori JA

    「httpS://」だと暗号化されず平文で送信……「PHP」に約20年潜んでいた脆弱性が解決/問題はいたってシンプル、なんともはや……【やじうまの杜】

Published: First seen: Читать по-русски

Open as a page