hn.today

PHP advisory: mixed-case HTTPS and FTPS URLs can expose data in plaintext

github.com13 points2 comments
Screenshot of PHP advisory: mixed-case HTTPS and FTPS URLs can expose data in plaintext

PHP’s HTTP and FTP stream wrappers can transmit data without TLS when an HTTPS or FTPS URL uses an uppercase “S,” such as HTTPS://, httpS://, or FTPS://. Although the wrappers accept schemes regardless of capitalization, their TLS check was case-sensitive, allowing a URL to pass an application’s case-insensitive security validation while using plain HTTP or FTP. Applications that access such URLs through functions including file_get_contents() or fopen() may expose credentials, tokens, cookies, request bodies, and transferred files to anyone able to observe the network connection. The issue also affects redirects: an HTTPS request redirected to a mixed-case HTTPS URL can resend a POST body and retained authentication headers without encryption.

The advisory rates the vulnerability High, with a CVSS score of 8.2, and identifies confidentiality as the principal impact; exploitation requires a relevant URL to reach a stream wrapper and an attacker to observe the traffic. Direct mixed-case URLs have been affected since PHP 5.2.0, while redirects to them have been affected since PHP 4.3.0, according to code inspection. Fixed releases are PHP 8.2.36, 8.3.37, 8.4.28, and 8.5.13. Until upgrading, applications should lowercase HTTPS and FTPS schemes before using stream functions. Where redirects are enabled, automatic following should be disabled and every redirect target validated and normalized; fixing only the initial URL does not prevent exposure through a redirect.

Read on github.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.