Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRP: CVE-2024-4577 - PHP-CGI RCE #572

Open
LeonardoE95 opened this issue Dec 16, 2024 · 1 comment
Open

PRP: CVE-2024-4577 - PHP-CGI RCE #572

LeonardoE95 opened this issue Dec 16, 2024 · 1 comment
Labels
Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted

Comments

@LeonardoE95
Copy link
Contributor

Hi there.

I would like to implement a plugin to detect a PHP-CGI RCE (CVE-2024-4577) affecting deployments of PHP that use Apache and that run on Windows, such as when using XAMPP, a popular platform for PHP development.

Specifically, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages (such as the Japanese locale), Windows may use "Best-Fit" behavior to replace characters in the command line given to Win32 API functions. PHP CGI module may misinterpret those characters as PHP options, which may allow a malicious user to pass options to the PHP binary being run, allowing to achieve RCE.

This vulnerability affects the following versions of PHP installed on the Windows operating system:

Affected PHP Versions
PHP 8.3 < 8.3.8
PHP 8.2 < 8.2.20
PHP 8.1 < 8.1.29

References:
https://nvd.nist.gov/vuln/detail/cve-2024-4577
https://labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/
https://github.com/watchtowrlabs/CVE-2024-4577

Thanks.

@tooryx
Copy link
Member

tooryx commented Jan 9, 2025

You can work on this.

@tooryx tooryx added PRP:Accepted Contributor main The main issue a contributor is working on (top of the contribution queue). labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted
Projects
None yet
Development

No branches or pull requests

2 participants