CVE-2026-128064: PHP sends HTTPS:// and FTPS:// requests in clear text when the scheme is not lowercase

ByLinuxtastic

November 30, 2026 #CVE, #PHP

PHP’s HTTP and FTP stream wrappers accept a URL’s scheme in any case, HTTPS:// as readily as https://, but in every PHP release before 8.2.36, 8.3.37, 8.4.28 and 8.5.13 they switched TLS on only when a lowercase s sat at a fixed position in the scheme. A URL written HTTPS:// or FTPS://, whether in the application’s own code, in data it reads, or in the target of a redirect it follows, was therefore fetched over plain HTTP or FTP, credentials, request body and all, where anyone on the path could read it. Upgrade to PHP 8.2.36, 8.3.37, 8.4.28 or 8.5.13, or the distribution package carrying the fix, and restart PHP-FPM; until then, lowercase every scheme the application fetches and stop it following redirects it has not checked. It is one of the 19 November 2026 PHP security set.

CVE-2026-128064 at a glance.

ComponentPHP, the HTTP and FTP stream wrappers in ext/standard behind file_get_contents(), fopen(), copy() and the other stream functions on URLs. Packaged as php8.x / php-common everywhere; cURL is a separate path and not affected
Affected versionsevery PHP release before 8.2.36, 8.3.0 to 8.3.36, 8.4.0 to 8.4.27 and 8.5.0 to 8.5.12; the record’s first range starts at 0, so 8.1, 8.0 and 7.x are affected and unfixed upstream
Fixed inPHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13, released 19 November 2026; the 8.5.13 changelog entry names the CVE. Debian, Ubuntu and Red Hat have backported it to their older 8.x, 8.0 and 7.4 builds
SeverityPHP Group (CNA) CVSS 4.0 8.2 High (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N); NVD Awaiting Analysis with the same vector. Red Hat Important, scored 5.9 (AV:N/AC:H, confidentiality only); SUSE important, 7.5. CWE-319, cleartext transmission of sensitive information
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026 (catalogue 2026.11.27). EPSS 0.0027 (12th percentile) on 25 November 2026. CISA’s SSVC on the record: exploitation none, automatable no, technical impact partial
Who is exposedPHP applications that fetch URLs through the stream wrappers where the scheme can arrive in upper or mixed case: a URL from configuration or user input written that way, or an HTTP 307 redirect whose Location an attacker-influenced server supplies; the attacker then needs a position on the network path to read the plaintext (AT:P). Applications that fetch only lowercase, hard-coded URLs and do not follow redirects are not exposed; cURL-based code is not on this path at all
PublishedCVE record 19 November 2026 (PHP CNA); GitHub advisory GHSA-f6gg-rchx-xw8j the same day; the record credits Kushal Khemka and nine others including OpenSec, Jakub Zelenka and Derick Rethans; this page built 30 November 2026, last updated 30 November 2026

What it is

When a stream function receives a URL, PHP matches the scheme against its registered wrappers without regard to case, so HTTP://, Https:// and https:// all reach the HTTP wrapper and FTPS:// reaches the FTP one. Inside those wrappers a separate check decided whether to wrap the connection in TLS, and the record says it “enable[s] TLS only when the scheme contains a lowercase ‘s’ at a fixed position”. The two checks disagree exactly when the scheme is not lowercase: the wrapper accepts the URL as a secure one and then connects in the clear. The request goes out with whatever the application put in it, Basic credentials, API tokens, a POST body, and the response, including any file transferred, comes back the same way.

Nobody writes HTTPS:// on purpose, which is why the redirect case is the one that matters. The advisory names HTTP 307 redirects: if the application follows redirects, a server it talks to, or an attacker who can influence that server’s Location header, can send it to HTTPS://real-api.example/… and the application will connect there without TLS while believing otherwise. The attacker still has to be on the path to read the traffic, which is what the AT:P in the CNA’s vector and the AC:H in Red Hat’s stand for, and it is why the scores range from 5.9 to 8.2 for the same bug. The fix makes the TLS decision from the same case-insensitive match the wrapper selection uses.

The affected range begins at zero, so this has been in PHP for as long as the wrappers have existed; the project fixed its four supported branches on 19 November 2026 and the distributions backported the change to 8.1, 8.0 and 7.4 builds they still maintain. It is the second stream-wrapper bug in the same release set, alongside the folded-header denial of service, and the same upgrade covers both.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one. The distributions shipped the whole 19 November set in one package update.

DistributionStatusFixed package
AlpineTracker unreachable on 30 November 2026not read; look for php83 / php84 at 8.3.37 / 8.4.28
DebianFixed in bookworm (DLA-4916-1), trixie (DSA-6641-1), forky and sidbookworm php8.2 8.2.36-1~deb12u1; trixie php8.4 8.4.28-1~deb13u1; sid 8.4.28-3
UbuntuFixed by USN-9185-1 of 23 November 2026 (the CVE page itself refused automated readers on 30 November)26.10 php8.5 8.5.9-0ubuntu2.2; 26.04 php8.5 8.5.4-0ubuntu1.6; 24.04 php8.3 8.3.6-0ubuntu0.24.04.14; 22.04 php8.1 8.1.2-1ubuntu2.29; 20.04 php7.4 7.4.3-4ubuntu2.29+esm6 and older through Ubuntu Pro
RHEL, Rocky, Alma, CentOS StreamImportant (score 5.9); errata of 20–25 November 2026 for RHEL 7 ELS, 8, 9 and 10 and their EUS/E4S streams; RHEL 6 out of supportRHEL 10 php8.4-8.4.28-1.el10_3 (RHSA-2026:100821) and php-8.3.37-1.el10_3 (RHSA-2026:102300); RHEL 9 php:8.3 / php:8.4 / php:8.2 streams and php-8.0.30-8.el9_9.2; RHEL 8 php:8.2 and php:7.4 streams; RHEL 7 ELS php-5.4.16-48.el7_9.2 (RHSA-2026:101337)
openSUSE/SLEimportant, 7.5 / 8.2; released for SLE 15 SP7 and SP4/SP5 LTSS (SUSE-SU-2026:5389-1, 5390-1, 5398-1, 5399-1 of 20 November 2026); SLES 16.x in progressSLE 15 SP7 php8 8.3.37-150700.3.27.1; SLES 15 SP4/SP5 php8 8.0.30-150400.4.83.1; php7 7.4.33-150400.4.84.1 for Legacy and Package Hub
Fedora, Arch; php.net source builds and Docker imagesNot consulted; upstream fixed versions applyPHP 8.2.36 / 8.3.37 / 8.4.28 / 8.5.13

How to check

Three questions: which PHP is running, does the code fetch URLs through the stream wrappers, and can the scheme of such a fetch arrive in a case the code did not write, either from data or from a redirect. The first is a command; the other two are reading.

# 1. the running interpreter(s)
php -v | head -1
for p in $(pgrep -f 'php-fpm: master'); do readlink /proc/$p/exe; done | sort -u
dpkg -l 'php8*' 'php7*' 2>/dev/null | awk '/^ii/{print $2, $3}'; rpm -qa 'php*' 2>/dev/null | sort

# 2. stream-wrapper fetches of https:// or ftps:// URLs, and any scheme already written in capitals
grep -rnE '\b(file_get_contents|fopen|copy|file|readfile|simplexml_load_file)\s*\(' --include='*.php' /var/www 2>/dev/null | grep -iE 'https?://|ftps?://|\$' | head -30
grep -rnE '(HTTPS|Https|FTPS|Ftps)://' --include='*.php' --include='*.ini' --include='*.env' --include='*.yml' /var/www /etc/php 2>/dev/null | head

# 3. fetches that follow redirects (the default) or take their URL from outside
grep -rnE 'follow_location|max_redirects|stream_context_create' --include='*.php' /var/www 2>/dev/null | head

An interpreter at the fixed version, or a distribution build at or above the table’s, is done once FPM has restarted. No stream-wrapper fetches of remote URLs means the vulnerable path is not used, whatever the version; code that fetches only through cURL is in the same position. Fetches whose URL comes from data, or that follow redirects from a server you do not control, on an affected build, are the exposed case, and the thing being exposed is whatever the request carried.

How to fix it

Upgrade the package and restart PHP-FPM; workers keep the old code until the master respawns them.

# Debian / Ubuntu
apt update && apt install --only-upgrade 'php8.*' 'php7.*' 2>/dev/null; systemctl restart 'php*-fpm'
# RHEL family (module streams keep their stream)
dnf upgrade 'php*' && systemctl restart php-fpm
# SUSE
zypper patch && systemctl restart php-fpm
# containers: rebuild on php:8.4.28 / 8.3.37 / 8.2.36 / 8.5.13 and redeploy
php -v | head -1

If you cannot upgrade yet, the advisory’s workarounds are the obvious ones: write every HTTPS and FTPS scheme in lowercase, and if the application allows redirects, either disable automatic redirects or validate and normalise every redirect target before following it. Normalising means lowercasing the scheme and checking it is still one you meant to allow, since a redirect to plain http:// is a downgrade too, and this bug is not the only way to get one. Do not rely on a web application firewall or an egress proxy to spot the uppercase scheme: the proxy sees the connection PHP actually makes, which is plain HTTP to a host that expected TLS, and will pass it as ordinary traffic.

# a fetch that cannot be downgraded by a redirect, on any PHP version
#   $url = strtolower(parse_url($url, PHP_URL_SCHEME)) . substr($url, strlen(parse_url($url, PHP_URL_SCHEME)));
#   $ctx = stream_context_create(['http' => ['follow_location' => 0, 'timeout' => 5]]);
#   $body = file_get_contents($url, false, $ctx);
#   // then inspect $http_response_header for a 3xx and decide yourself whether to follow it

Sources

  • CVE-2026-128064 at CVE.org — the PHP Group CNA record (19 November 2026): the description, the four affected ranges, CVSS 4.0 8.2, CWE-319, the ten credits
  • GHSA-f6gg-rchx-xw8j — the PHP advisory: the lowercase-s check, the 307 redirect case, the workarounds
  • PHP 8 ChangeLog — the 8.5.13 entry of 19 November 2026 naming the CVE (the 8.4.28, 8.3.37 and 8.2.36 entries were beyond what we could read of the page)
  • NVD entry — Awaiting Analysis; the CNA vector, the per-branch ranges, SSVC exploitation none / automatable no
  • Distribution trackers: Debian (DLA-4916-1, DSA-6641-1) · Ubuntu USN-9185-1 · Red Hat (Important, 5.9, RHSA-2026:100821 and siblings) · SUSE (important) · Alpine (unreachable on 30 November)
  • EPSS score for this CVE, 25 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.