Known exploited vulnerability
CVE-2024-4577
The short answer
CVE-2024-4577 affects PHP Group PHP and is rated critical (CVSS 9.8). CISA added it to the Known Exploited Vulnerabilities catalog on 2024-06-12: attackers are using it, so patch it first. The vendor has linked a patch.
What it is
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.
Weakness: CWE-78.
Severity
9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Exploited (CISA KEV)
Yes, since Jun 12, 2024
Federal due date Jul 3, 2024
EPSS, next 30 days
100%
Higher than 100% of scored CVEs
How it can be exploited
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
What CISA says to do
Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
Affected products
PHP, php. NVD's record lists the exact affected versions.
References
- arstechnica.com/security/2024/06/php-vulnerability-allows-attackers-to-run-malicious-code-on-windows-servers/ ExploitPress/Media CoverageThird Party Advisory
- blog.orange.tw/2024/06/cve-2024-4577-yet-another-php-rce.html Third Party Advisory
- cert.be/en/advisory/warning-php-remote-code-execution-patch-immediately Third Party Advisory
- devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/ ExploitThird Party Advisory
- github.com/11whoami99/CVE-2024-4577 Exploit
- github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv ExploitThird Party Advisory
- github.com/rapid7/metasploit-framework/pull/19247 ExploitIssue TrackingPatch
- github.com/watchtowrlabs/CVE-2024-4577 ExploitThird Party Advisory
- github.com/xcanwin/CVE-2024-4577-PHP-RCE ExploitThird Party Advisory
- isc.sans.edu/diary/30994 ExploitThird Party Advisory
- labs.watchtowr.com/no-way-php-strikes-again-cve-2024-4577/ ExploitThird Party Advisory
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/ Mailing List
Questions
Is CVE-2024-4577 being exploited?
Yes. CISA added CVE-2024-4577 to its Known Exploited Vulnerabilities catalog on 2024-06-12, with a federal remediation due date of 2024-07-03. CISA lists it as used in ransomware campaigns.
How do I fix CVE-2024-4577?
CISA's required action: Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
From NVD, CISA KEV, FIRST EPSS and OSV.dev, checked . Status on NVD: Analyzed. The description is NVD's text, quoted as published.
Related
Latest CVEs this week
Critical and High CVEs from the last 7 days, with KEV and EPSS.
Exploited vulnerabilities by vendor
Every vendor in CISA's KEV catalog, with its count.
PHP Group exploited vulnerabilities
Everything CISA lists as exploited for PHP Group.
Vulnerability watch
A briefing and a fix pull request when an advisory hits your dependencies.
Know the day a CVE lands in your code
Connect a GitHub repository and ZeusQA checks its dependencies daily, briefs each advisory and opens the fix. Three test runs free, no card.