Actively exploited vulnerability / CVE-2024-4577
PHP on Windows servers: an attacker can take control of your website or app
This flaw lets an attacker run their own code on the server and view the source code of your web applications. That can lead to data theft, a tampered website, or your server being used for further attacks. It is on the lists of vulnerabilities used in real attacks kept by CISA (the US cybersecurity agency) and by ENISA (the EU cybersecurity agency).
- Identifier
- CVE-2024-4577 · EUVD-2024-44188
- Severity
- Critical (9.8/10)
- On the CISA list (US)
- yes, since 12 June 2024
- Deadline given to US federal agencies
- 3 July 2024
- On the ENISA list (EU)
- yes
- Probability of exploitation (EPSS)
- 94.8% (FIRST's estimate for the next 30 days)
Does it concern you?
PHP is the programming language behind many websites and web applications, such as online shops and internal portals. It concerns you if you run a Windows server with Apache where PHP runs in CGI mode.
Affected are PHP 8.1 versions before 8.1.29, 8.2 versions before 8.2.20, and 8.3 versions before 8.3.8, when used with Apache in CGI mode on Windows. Ask the company or person who manages your server which PHP version it uses and how it is set up.
Affected products and versions
- PHP Group PHP
- php: from 8.1.0 before 8.1.29; from 8.2.0 before 8.2.20; from 8.3.0 before 8.3.8
What to do
Update PHP to version 8.1.29, 8.2.20, 8.3.8 or later. If updating is not possible, apply the vendor's recommended mitigations or stop using this setup.
Versions that contain the fix: 8.1.29, 8.2.20, 8.3.8.
The official description
The text below is the description from the public database.
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.
Sources
- Debian Security Tracker
- Red Hat Security Data
- CVE Program
- GitHub Advisory Database
- Vendor advisory: nvd.nist.gov
- NVD
- ENISA EUVD
Data from the public CVE and NVD databases, the CISA KEV and ENISA EU KEV lists and FIRST's EPSS score. The explanations are ours, written from that data. Last updated: 29 November 2026.