LiveActive security incident?Get immediate response
CVE Record

CVE-2024-4577: Argument Injection in PHP-CGI

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.

CriticalCVSS 9.8Known exploitedUpdated
Glexia's TakeHuman reviewedcritical

Security readout for executives and security teams

Plain-English summary

CVE-2024-4577 lets an unauthenticated attacker abuse how Windows converts command-line characters for PHP-CGI. On affected Windows Apache deployments, this can expose source code or run attacker-controlled PHP code. CISA KEV status means known exploitation exists, so internet-facing systems need urgent attention.

Executive priority

Treat as an emergency patching item for any public Windows Apache PHP-CGI server. The business risk is direct server compromise, not just information leakage, and known exploitation is documented through CISA KEV.

Technical view

Affected PHP 8.1, 8.2, and 8.3 releases before 8.1.29, 8.2.20, and 8.3.8 can misinterpret Windows “Best-Fit” character conversion as PHP-CGI options when used with Apache on Windows and certain code pages. The issue is CWE-78 argument injection with CVSS 9.8.

Likely exposure

Most exposed assets are Windows web servers running Apache with PHP-CGI on affected PHP 8.x branches, especially public-facing systems. Evidence in the bundle limits the affected configuration to Windows, Apache, PHP-CGI, and certain code pages; other PHP deployment modes are not established here.

Exploitation context

CISA KEV status supports that this vulnerability has been exploited in the wild. Public research, proof-of-concept repositories, and a Metasploit pull request also indicate broad public knowledge and weaponization pressure. This combination raises urgency for exposed Windows PHP-CGI deployments.

Researcher notes

Validation should focus on deployment mode, operating system, PHP branch, fixed version level, and code page context. The bundle supports source disclosure and arbitrary PHP execution risk, but does not justify expanding scope beyond the stated Windows Apache PHP-CGI conditions.

Mitigation direction

  • Upgrade PHP to 8.1.29, 8.2.20, 8.3.8, or later as applicable.
  • Prioritize internet-facing Windows Apache PHP-CGI systems for emergency remediation.
  • Review PHP and vendor advisories before relying on temporary workarounds.
  • Restrict external access to affected services until patched where business allows.
  • Monitor web server and PHP logs for suspicious CGI option-like request patterns.

Validation and detection

  • Inventory Windows servers running Apache with PHP-CGI and PHP 8.1, 8.2, or 8.3.
  • Confirm installed PHP versions are at or above the fixed releases.
  • Check whether systems use code pages implicated by vendor or researcher guidance.
  • Verify internet exposure through asset management and external attack surface records.
  • Review CISA KEV status and internal telemetry for evidence of targeting.
Prepared
Reviewed
Confidence
high
Sources
10

Michael Williams reviewed this cited source version on .

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-78: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2024-4577 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
Yes
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
21Source links

CISA KEV status

Status
Known exploited
Source
CISA / ADP
Date added
Not provided

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2024-4577Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
PHP GroupPHP8.1.*, 8.2.*, 8.3.*affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.