VulnWatch by ve1ve2
high 8.2 EPSS 0.27%

GHSA-f6gg-rchx-xw8j / CVE-2026-128064: Mixed-case HTTPS and FTPS URLs can expose data in plaintext

Source:
PHP releases (GitHub php/php-src tags)
Published:
Fetched:
Updated:
Affects:
php ext-standard

https://github.com/php/php-src/security/advisories/GHSA-f6gg-rchx-xw8j ↗

repo-advisoryphpCWE-319securityrepo:php/php-src

Mixed-case HTTPS and FTPS URLs can expose data in plaintext ### Summary 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. ### Details The stream wrappers recognise URL schemes without regard to case, but the decision to enable TLS checks for a lowercase `s` at a fixed position. A URL that passes an application's case-insensitive HTTPS or FTPS validation can consequently use the unencrypted HTTP or FTP transport. The HTTP issue also applies to redirect targets. For example, a `307` redirect from a valid HTTPS connection to an uppercase `HTTPS://` URL can cause the preserved POST body and any retained authentication headers to be sent in cleartext. A request can disclose data even if the destination rejects the unexpected plaintext connection. The fix determines whether TLS is required by comparing the complete scheme case-insensitively. It covers both the HTTP and FTP stream wrappers. ### Impact An attacker who can observe an affected connection can read the data that the application expected TLS to protect. This can include Basic authentication credentials, bearer tokens, cookies, sensitive POST data, FTP login credentials and file contents. Exploitation requires an affected URL to reach a stream wrapper, either directly or through a redirect, and access to the resulting network traffic. The impact depends on the data being transferred. disclosure of credentials or other highly sensitive data can have a serious confidentiality impact. ### Affected versions 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. This is based on code inspection. ### Mitigation Upgrade to the fixed release for your PHP branch when it becomes available. As a temporary workaround, ensure that HTTPS and FTPS URL schemes are written in lowercase before passing them to a stream function. If HTTP redirects are allowed, disable automatic redirects and validate and normalise every redirect target before following it. Normalising only the initial URL does not protect requests that follow redirects automatically. Affected packages: php:ext-standard Patched: ext-standard 8.2.36, ext-standard 8.3.37, ext-standard 8.4.28, ext-standard 8.5.13

Linked vulnerabilities (2)

CVE-2026-128064 high 8.2 EPSS 0.27% (p20) NVDCVE.orgGHSA
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Mixed-case HTTPS and FTPS URLs can expose data in plaintext. The HTTP and FTP stream wrappers recognise URL schemes case-insensitively, but enable TLS only when the scheme contains a lowercase "s" at a fixed position. A URL such as HTTPS:// or FTPS:// passed to file_get_contents(), fopen() or other stream functions, or received as an HTTP redirect target, is therefore handled over unencrypted HTTP or FTP. An attacker able to observe the network traffic can read data the application expected TLS to protect, including credentials, request bodies and transferred files. This issue affects...

CWE: CWE-319Aliases: CVE-2026-115560, CVE-2026-126714, CVE-2026-127960, CVE-2026-128090, CVE-2026-129289, CVE-2026-129291, CVE-2026-129292, CVE-2026-129496, CVE-2026-129506, CVE-2026-129538, CVE-2026-15353, GHSA-f6gg-rchx-xw8j, CVE-2026-129481, CVE-2026-129501NVD: Awaiting Analysis
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Mixed-case HTTPS and FTPS URLs can expose data in plaintext

CWE: CWE-319Aliases: CVE-2026-128064