Originally published on proxymint.
CVE-2026-128064: PHP sends HTTPS:// and FTPS:// URLs with an uppercase S in plaintext. Test your build in 30 seconds, check versions, grep your code.
TL;DR
-
Run the 30-second nc test before reading anything else. Listen with
nc -l 8443in one terminal and runphp -r 'file_get_contents("HTTPS://127.0.0.1:8443/");'in another. A readableGET / HTTP/1.1in the listener means your build skips TLS. - Patch to 8.2.36, 8.3.37, 8.4.28 or 8.5.13, all released on 19 November. PHP 8.1 got no release and stays affected, so on 8.1 the real fix is a newer branch or a distro backport.
-
Don't trust
php -valone on a distro. Ubuntu 22.04 reports 8.1.2 and is patched, while aphp:8.1Docker image reports 8.1.34 and isn't. -
Lowercase URLs in your own code don't protect redirects. A 307 to
HTTPS://resends the POST body and auth headers in cleartext. Where requests carry secrets, setfollow_locationto 0.
Key takeaways
-
Grep for the exact spellings. Only a capital S in the fifth position (HTTP) or fourth (FTP) skips TLS, so
Https://is fine andhTTPS://isn't. -
Expect port 80, not just plaintext. With no port in the URL, an affected build sends
HTTPS://host/to port 80. - Lowercase the scheme where URLs enter your code. That covers user input, config and crawled pages. Until you've upgraded, check each redirect hop yourself as well.
- Test the binary that serves traffic. The host CLI, PHP-FPM and the PHP inside your image can be three different builds.
Read the full guide on proxymint, with the commands, tables and sources.
Top comments (0)