{"vuln_id":"GHSA-p99j-rfp4-xqvq","aliases":["CVE-2024-8926","CVE-2024-4577"],"description":"PHP CGI Parameter Injection Vulnerability (CVE-2024-4577 bypass)","published_at":"2024-09-27T17:50:38Z","modified_at":"2024-09-27T17:50:38Z","first_seen_at":"2026-11-22T14:05:37.626369Z","severity":"medium","severity_source":"ghsa","cvss_score":null,"cvss_vector":null,"cwe":[],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-p99j-rfp4-xqvq"},"matched_alias":null,"items":[{"id":12669,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-p99j-rfp4-xqvq / CVE-2024-8926: PHP CGI Parameter Injection Vulnerability (CVE-2024-4577 bypass)","summary":"PHP CGI Parameter Injection Vulnerability (CVE-2024-4577 bypass) # PHP CGI Parameter Injection Vulnerability This vulnerability is a bypass of CVE-2024-4577 when using a non-standard configuration of Windows codepages, only obtainable through the registry by pointing the ACP codepage to an OEM codepage. The required configuration is unlikely to occur in a real environment. ## Reproduction: The reproduction environment is similar to CVE-2024-4577. 1. Install xampp on Windows and uncomment the following content in httpd-xampp.conf: ``` # # PHP-CGI setup # SetHandler application/x-httpd-php-cgi Action application/x-httpd-php-cgi \"/php-cgi/php-cgi.exe\" ``` 2. Download the latest PHP installation package. https://windows.php.net/downloads/releases/php-8.3.8-nts-Win32-vs16-x64.zip After decompression, stop xampp first, and then copy all the decompressed files to C:\\xampp\\php . This is because xampp has not updated the latest version of PHP, so we need to update it manually. 3. Modify the ACP and OEMCP fields under the registry `\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage` to 437 Restart the system 4. POC https://xxxxurlxxxx.com/?%a8-s%a8 or ``` POST /?%a8-d%a8+allow_url_include%3d1+%a8-d%a8+auto_prepend_file%3dphp://input HTTP/1.1 Host: {{host}} User-Agent: curl/8.3.0 Accept: */* Content-Length: 24 Content-Type: application/x-www-form-urlencoded Connection: keep-alive ``` ## Vulnerability principle: In many code pages, Windows converts some wide characters to \", such as 0xa8 in 437 code page. When querystring is %a8-s%a8, Windows will first convert %a8 to \", and then remove the quotation marks before and after the command line parameters, that is, remove the quotation marks before and after -s. Finally, php-cgi.exe extracts only -s from argv, successfully bypassing the patch for CVE-2024-4577. ## Affected scope: Latest version of PHP **Affected code page:** \"37\"=\"c_037.nls\" ;IBM EBCDIC* U.S./Canada \"1026\"=\"c_1026.nls\" ;IBM EBCDIC* Latin-5 Turkey C_1047.NLS C_1140.NLS C_1142.NLS C_1143.NLS C_1144.NLS C_1145.NLS C_1146.NLS C_1147.NLS C_1148.NLS C_1149.NLS \"20273\"=\"c_20273.nls\" ;IBM EBCDIC Germany \"20277\"=\"c_20277.nls\" ;IBM EBCDIC Denmark/Norway \"20278\"=\"c_20278.nls\" ;IBM EBCDIC Finland/Sweden \"20280\"=\"c_20280.nls\" ;IBM EBCDIC Italy \"20284\"=\"c_20284.nls\" ;IBM EBCDIC Latin America/Spain \"20285\"=\"c_20285.nls\" ;IBM EBCDIC United Kingdom \"20290\"=\"c_20290.nls\" ;IBM EBCDIC Japanese Katakana Extended \"20297\"=\"c_20297.nls\" ;IBM EBCDIC France \"20420\"=\"c_20420.nls\" ;IBM EBCDIC Arabic \"20423\"=\"c_20423.nls\" ;IBM EBCDIC Greek C_20424.NLS \"20833\"=\"c_20833.nls\" ;IBM EBCDIC Korean Extended \"20838\"=\"c_20838.nls\" ;IBM EBCDIC Thai \"20871\"=\"c_20871.nls\" ;IBM EBCDIC Icelandic \"20880\"=\"c_20880.nls\" ;IBM EBCDIC Cyrillic \"20905\"=\"c_20905.nls\" ;IBM EBCDIC Patched: 8.1.30, 8.2.24, 8.3.12","url":"https://github.com/php/php-src/security/advisories/GHSA-p99j-rfp4-xqvq","published_at":"2024-09-27T17:50:38Z","updated_at":"2024-09-27T17:50:38Z","fetched_at":"2026-11-22T14:05:37.431198Z","severity":"critical","cvss_score":9.8,"epss":0.99985,"is_kev":true,"has_exploit":true,"kev_due_date":"2024-07-03","vendor":"php","product":"php-src","vuln_id":"CVE-2024-8926","vuln_ids":["CVE-2012-1823","CVE-2024-4577","CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","GHSA-3QGC-JRRR-25JV","GHSA-P99J-RFP4-XQVQ","GHSA-VXPP-6299-MXW3"],"tags":["repo-advisory","security","repo:php/php-src","stack"],"cluster_id":11778,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12669","html":"https://vulnwatch.ve1ve2.com/item/12669"}}]}