GHSA-9fcc-425m-g385 / CVE-2024-5585: bypass CVE-2024-1874
- Published:
- Fetched:
- Updated:
- Affects:
- php php-src
https://github.com/php/php-src/security/advisories/GHSA-9fcc-425m-g385 ↗
bypass CVE-2024-1874 ### Summary same as CVE-2024-1874 > due to the improper handling of command line arguments on Windows, maliciously crafted arguments can inject arbitrary commands even if the bypass_shell option is enabled. ### Details Add a space at the end of filename, others are the same as [CVE-2024-1874](https://github.com/php/php-src/security/advisories/GHSA-pc52-254m-w9w7) ### PoC 1. Save the following file as test.bat ``` echo hello ``` 2. Save the following file as 1.php, **notiece the space at the end of argv-filename** ``` true)); proc_close($proc); ``` 3. Run it with PHP and confirm that notepad.exe is popped up. ### Impact Malicious command line arguments in windows platform Patched: 8.1.29, 8.2.20, 8.3.8