Logic Foundry

Build with understanding.

PHP security fix addresses TLS downgrade in mixed-case HTTPS and FTPS URLs

As reported on November 20, 2026, the PHP project had released security updates the previous day addressing CVE-2026-128064, a flaw that could cause some HTTPS or FTPS requests to be sent without TLS. The issue has a CVSS 4.0 score of 8.2 (High). The release addressed 18 CVEs in total, four of which could allow remote code execution.

According to PHP’s advisory, its HTTP and FTP stream wrappers recognize URL schemes without regard to case, but the check that enables TLS looks for a lowercase s at a fixed position. As a result, spellings such as HTTPS://, httpS:// and FTPS:// could bypass the expected encrypted connection.

PHP security fix addresses TLS downgrade in mixed-case HTTPS and FTPS URLs (1)

The risk is not limited to URLs supplied directly to file_get_contents() or fopen(). An application that automatically follows redirects could also encounter a mixed-case scheme in a redirect target. For example, an HTTP 307 redirect to an HTTPS:// URL could cause the original POST body and authentication information to travel over an unencrypted connection. PHP’s advisory says an attacker would need to be able to observe the relevant network traffic to obtain exposed data, which could include credentials, tokens, cookies, POST data, FTP login details or file contents.

PHP security fix addresses TLS downgrade in mixed-case HTTPS and FTPS URLs (2)

PHP’s code review traced the direct-URL case back to PHP 5.2.0 and the redirect case to PHP 4.3.0. The fixed releases listed in the November 19 update are PHP 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0. PHP 8.1 and earlier branches are past their upstream lifecycle and will not receive routine security fixes from the PHP project.

For applications that cannot update immediately, the reported temporary mitigation is to normalize HTTPS and FTPS scheme names to lowercase before passing URLs to stream functions. Applications that follow redirects must also validate and normalize each redirect target; changing only the initial URL is insufficient.