Skip to main content
← All vulnerabilities
CVE-2024-4577

Argument Injection in PHP-CGI

Published
Last modified
published
Listed in CISA KEV
Fix
Fixed in 8.1.29, 8.2.20, 8.3.8
None on Exploit-DB, Metasploit or GitHub

Summary

PHP's CGI module, used with Apache on Windows, is affected when the system uses certain code pages. An attacker could exploit this to pass unintended options to the PHP binary, potentially exposing script source code or running arbitrary PHP code on the server.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, 8.3.* before 8.3.8, when using Apache and PHP-CGI on Windows, if the system is set up to use certain code pages, Windows may use "Best-Fit" behavior to replace characters in 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 PHP binary being run, and thus reveal the source code of scripts, run arbitrary PHP code on the server, etc.

Timeline

  1. CVE published
  2. Added to CISA KEV

    CISA has evidence of exploitation in the wild

  3. CISA remediation deadline

    Due date for US federal agencies to patch

  4. Record last updated
  5. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • PHP Group PHP

    From 8.1.* · fixed in 8.1.29; From 8.2.* · fixed in 8.2.20; From 8.3.* · fixed in 8.3.8

References 19

GitHub · php/php-src

blog.orange.tw

devco.re

arstechnica.com

imperva.com

GitHub · 11whoami99/CVE-2024-4577

GitHub · xcanwin/CVE-2024-4577-PHP-RCE

GitHub · rapid7/metasploit-framework

labs.watchtowr.com

GitHub · watchtowrlabs/CVE-2024-4577

php.net

cert.be

isc.sans.edu

openwall.com

lists.fedoraproject.org

security.netapp.com