{"id":53917,"date":"2026-11-19T15:58:48","date_gmt":"2026-11-19T20:58:48","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=53917"},"modified":"2026-11-19T15:59:15","modified_gmt":"2026-11-19T20:59:15","slug":"php-mixed-case-url-schemes-can-expose-data","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/11\/19\/php-mixed-case-url-schemes-can-expose-data\/","title":{"rendered":"PHP: Mixed-Case URL Schemes Can Expose Data"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/php\/php-src\/security\/advisories\/GHSA-f6gg-rchx-xw8j\">PHP<\/a> (<a href=\"https:\/\/x.com\/mattiasgeniar\/status\/2123436542995964123\">Mattias Geniar<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/php\/php-src\/security\/advisories\/GHSA-f6gg-rchx-xw8j\"><p>PHP&rsquo;s HTTP and FTP stream wrappers can send data without encryption when an HTTPS or FTPS URL has an uppercase <code>S<\/code> in its scheme, for example <code>HTTPS:\/\/<\/code>, <code>httpS:\/\/<\/code> or <code>FTPS:\/\/<\/code>. Applications using <code>file_get_contents()<\/code>, <code>fopen()<\/code> or other stream functions may therefore expose passwords, authentication tokens, request bodies or transferred files to an attacker able to observe the network traffic.<\/p>\n<p>[&#8230;]<\/p>\n<p>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.<\/p><\/blockquote>\n<p>That was <a href=\"https:\/\/www.php.net\/ChangeLog-4.php#4.3.0\">in 2002<\/a>. It&rsquo;s now been fixed in PHP 8.5.13 and other versions.<\/p>\n\n<p>There&rsquo;s also a new <a href=\"https:\/\/www.php.net\/releases\/8.6\/en.php\">PHP 8.6<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=50557870\">Hacker News<\/a>). Lots of <a href=\"https:\/\/www.theregister.com\/patches\/2026\/11\/18\/another-critical-php-security-release-has-dropped\/5310911\">security fixes<\/a> recently.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/10\/21\/php2shell\/\">PHP2Shell<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>PHP (Mattias Geniar): PHP&rsquo;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-11-19T20:58:51Z","apple_news_api_id":"883f1d51-120c-4bf3-b857-a2f3d0451603","apple_news_api_modified_at":"2026-11-19T20:58:51Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AiD8dURIMS_O4V6Lz0EUWAw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[131,2095,359,355,48,581,489,96],"class_list":["post-53917","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-exploit","tag-php","tag-privacy","tag-security","tag-ssltls","tag-url","tag-web"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/53917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=53917"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/53917\/revisions"}],"predecessor-version":[{"id":53919,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/53917\/revisions\/53919"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=53917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=53917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=53917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}