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.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.