Thursday, November 19, 2026

PHP: Mixed-Case URL Schemes Can Expose Data

PHP (Mattias Geniar):

PHP’s HTTP and FTP stream wrappers can send data without encryption when an HTTPS or FTPS URL has an uppercase S in its scheme, for example HTTPS://, httpS:// or FTPS://. Applications using file_get_contents(), fopen() or other stream functions may therefore expose passwords, authentication tokens, request bodies or transferred files to an attacker able to observe the network traffic.

[…]

Mixed-case URLs passed by an application have been affected since PHP 5.2.0, and redirects to a mixed-case URL since PHP 4.3.0.

That was in 2002. It’s now been fixed in PHP 8.5.13 and other versions.

There’s also a new PHP 8.6 (Hacker News). Lots of security fixes recently.

Previously:

Comments RSS · Twitter · Mastodon

Leave a Comment