The Capital S

One uppercase letter and PHP mails your secrets on a postcard.

Live demonstration of CVE‑2026‑128064 — running against real PHP … on this server.

1 · Choose the scheme

Tap any letter to flip its case. The rest of the request never changes — same host, same path, same secret token.

file_get_contents("https://api.payments.example/account/export");

with header Authorization: Bearer sk_live_…

2 · What the eavesdropper sees

The exact first bytes PHP put on the wire, captured by a loopback listener before anything left the process.

Pick a scheme above…
—

3 · The redirect downgrade

Worse still: a request that starts encrypted can be downgraded too. A 307 redirect to an uppercase‑scheme URL makes PHP re‑send the POST body and auth header in the clear. Pick the redirect target:

  1. 1 POST https://api.bank.example/login 🔒 sent over TLS
  2. 2 POST HTTPS://api.bank.example/login …
Choose a redirect target…
—

Why does this happen?

PHP's HTTP and FTP stream wrappers match the URL scheme case-insensitively — so HTTPS://, httpS:// and https:// all resolve to the same wrapper. But the code that decides whether to wrap the socket in TLS looks for a lowercase s at a fixed spot in the scheme string. Flip that one letter to uppercase and the check quietly says “no TLS” — while the request, headers and body go out in the clear. A 307 redirect to an uppercase-scheme URL downgrades a connection that started secure the same way, carrying the POST body and auth headers with it. It affects stream functions like file_get_contents() and fopen(); cURL is unaffected.

Affected: PHP 8.2.0–8.2.35, 8.3.0–8.3.36, 8.4.0–8.4.27, 8.5.0–8.5.12 (and every end-of-life line through its final release). Fixed in 8.2.36, 8.3.37, 8.4.28, 8.5.13. Until you can upgrade: lowercase the scheme with strtolower() and validate redirect targets, or use cURL.

This page captures loopback traffic on this server only — nothing is sent anywhere else, and you choose only letter casing. jhampton.io