A vulnerability in PHP that leads to sending requests unencrypted when using HTTPS

In addition to 7 critical vulnerabilities that lead to remote code execution, the PHP versions 8.5.13, 8.4.28, 8.3.37, and 8.2.36 have addressed the CVE-2026-128064 vulnerability, which causes requests to be sent unencrypted when using stream functions such as file_get_contents() and fopen() if the URL specifies the protocol scheme with a capital 'S' (e.g., HTTPS://, httpS://, or FTPS://). The issue arose because case sensitivity was not considered when validating the scheme, but the presence of the lowercase 's' was checked at a specific position in the URL to enable TLS. Consequently, if the scheme specified an uppercase 'S' instead of a lowercase one, the request was sent unencrypted, potentially allowing interception of cookies, passwords, tokens, and other sensitive data during traffic analysis.

The method also triggered when handling redirects — for example, a request to 'https://...' could be redirected to 'HTTPS://...' and PHP would send the subsequent request unencrypted, even if the target server rejected unencrypted connections over http://, but accepted connections on port 80. This issue has been present since PHP version 4.3.0 (2002), but until version 5.2.0 (2006), the attack could only be executed through redirects, as attempts to use 'HTTPS://' in functions initially resulted in an error output, and case insensitivity during validation was introduced only in version 5.2.0. As a workaround for protection, it is recommended to forcibly convert URL schemes to lowercase before using them in any PHP stream functions.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster