Skip to main content
EPSS 100.0%top 0.02%

Argument Injection in PHP-CGI (CVE-2024-4577)

0
Critical
Published: 06/12/2024 (06/12/2024, 07:30:56 UTC)
Source: GCVE Database
Product: php

Description

A critical vulnerability (CVE-2024-4577) affects PHP-CGI on Windows when used with Apache and certain code pages. In PHP versions 8.1.* before 8.1.29, 8.2.* before 8.2.20, and 8.3.* before 8.3.8, Windows may apply "Best-Fit" character replacement in command-line arguments, causing PHP-CGI to misinterpret these as PHP options. This can allow attackers to pass malicious options to the PHP binary, potentially exposing source code or enabling arbitrary code execution.

Affected software

Bitnamimore threats →ghsa
php
pkg:bitnami/php
Affected versions
<8.1.29>=8.2.0 <8.2.20>=8.3.0 <8.3.8

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/08/2026, 13:27:51 UTC

Technical Analysis

CVE-2024-4577 is an argument injection vulnerability in the PHP-CGI module on Windows platforms using Apache and specific code pages. Due to Windows' "Best-Fit" character replacement behavior in command-line arguments, PHP-CGI may incorrectly parse these characters as PHP options. This flaw exists in PHP versions prior to 8.1.29 for 8.1.*, prior to 8.2.20 for 8.2.*, and prior to 8.3.8 for 8.3.*, allowing attackers to pass crafted options to the PHP binary. Exploitation can lead to disclosure of PHP source code or execution of arbitrary PHP code on the server.

Potential Impact

Successful exploitation can result in unauthorized disclosure of PHP source code and execution of arbitrary PHP code on affected servers running vulnerable PHP-CGI versions on Windows with Apache. This can compromise server confidentiality and integrity.

Mitigation Recommendations

A patch is available and should be applied to update PHP to versions 8.1.29 or later, 8.2.20 or later, or 8.3.8 or later. Users should follow official PHP release notes and upgrade accordingly. No additional mitigations are specified in the advisory.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BIT-php-2024-4577
Osv Schema Version
1.5.0
Aliases
["CVE-2024-4577"]
Ecosystems
["Bitnami"]
Database Specific Severity
Critical

Threat ID: 6aa005deacd9273b49ab6070

Added to database: 09/08/2026, 12:55:58 UTC

Last enriched: 09/08/2026, 13:27:51 UTC

Last updated: 09/10/2026, 19:36:48 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses