hn.today

PHP sent cleartext data when using uppercase S in HTTPS:// protocol handler

twitter.com7 points2 comments
Screenshot of PHP sent cleartext data when using uppercase S in HTTPS:// protocol handler

A long-standing PHP bug caused URLs using uppercase “HTTPS” in PHP’s stream wrappers to bypass TLS, sending requests over an unencrypted connection. This could expose authentication tokens, POST bodies, and other sensitive data to anyone able to observe network traffic. The issue affected PHP functions and features that rely on those wrappers, including file_get_contents, getimagesize, exif_read_data, XML and DOM loading, md5_file, and SOAP WSDL retrieval. It did not affect common HTTP clients such as Guzzle, Symfony HttpClient, or curl.

The failure could be difficult to spot: without an explicit port, an uppercase HTTPS URL went to port 80 in plaintext. A server could then redirect the request to lowercase HTTPS, and PHP would follow the redirect over TLS, making the final response appear successful even though the initial request - and its credentials or body - had already leaked. Specifying port 443 instead caused an error. The bug had reportedly existed for about 20 years and was fixed in PHP releases 8.2.36, 8.3.37, 8.4.28, 8.5.13, and 8.6.0. The key practical concern is that applications using PHP’s built-in stream wrappers may have transmitted sensitive data without any obvious failure.

Read on twitter.com2 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

Upload2Shell · CVE-2026-125396

Upload2Shell · CVE-2026-125396

A use-after-free in Ghostscript’s Type 1 font loader lets crafted documents escape the -dSAFER sandbox and run commands through vulnerable upload, preview, and document-processing workflows. Ghostscript 10.08.0 fixes the flaw, with downstream vulnerabilities also reported in services including Debian CUPS, Roundcube, Plesk, and WordPress. (pwn.ai)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.