Skip to content
Noroxi
CVE-2024-4577· NVD / CVE Program· CNA php

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.8 · v3.1KEVWeaponized Fix available
Published
Jun 9, 2024
Updated
Jun 17, 2026
EPSS
100.0% · 100th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

99

Now

Patch today or shut off access.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
30 / 30 · Listed
EPSS
30 / 30 · 100.0%

CISA SSVC decision

Exploitation
active
Automatable
yes
Technical impact
total

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
9.8
CNA · php
9.8
agree

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Actively exploited in the wild

CISA added this to its Known Exploited Vulnerabilities catalog on Jun 12, 2024. That signals real attacks, not theory.

Remediation deadline for government agencies: Jul 3, 2024.

Known to be used in ransomware campaigns.

Affected systems

VendorProduct
phpphp
microsoftwindows
fedoraprojectfedora

Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)

Add to my stack

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • php php8.1.0 and later · before 8.1.29
  • php php8.2.0 and later · before 8.2.20
  • php php8.3.0 and later · before 8.3.8

Versions reported by the vendor

Affected version ranges reported by the assigning authority (php). Independent of NVD's CPE analysis and usually ahead of it.

  • PHP Group PHP

    • 8.1.* and later · before 8.1.29affected · semver
    • 8.2.* and later · before 8.2.20affected · semver
    • 8.3.* and later · before 8.3.8affected · semver

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
openSUSE:Tumbleweedphp8before 8.3.12-1.18.3.12-1.1

Same product

php: all records

Other highest-scoring records for the same primary product.

  • CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV
    99Now
  • CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle queKEV
    99Now
  • CVE-2018-7584In PHP through 5.6.33, 7.0.x before 7.0.28, 7.1.x through 7.1.14, and 7.2.x through 7.2.2, there is a stack-based buffer under-read while pa
    65This week
  • CVE-2018-19518University of Washington IMAP Toolkit 2007f on UNIX, as used in imap_open() in PHP and other products, launches an rsh command (by means of
    59Plan
  • CVE-2016-3078Multiple integer overflows in php_zip.c in the zip extension in PHP before 7.0.6 allow remote attackers to cause a denial of service (heap-b
    56Plan
  • CVE-2015-6834Multiple use-after-free vulnerabilities in PHP before 5.4.45, 5.5.x before 5.5.29, and 5.6.x before 5.6.13 allow remote attackers to execute
    53Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
PHP Group PHP8.1.29Vendor (CNA)
PHP Group PHP8.2.20Vendor (CNA)
PHP Group PHP8.3.8Vendor (CNA)
openSUSE:php88.3.12-1.1 · openSUSE:TumbleweedPackage registry (OSV)

Exploit status

Weaponized

A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.

Evidence

  • Metasploit module ×1
  • Exploit-DB entry ×1
  • Nuclei detection template ×1
  • Proof-of-concept repository on GitHub ×50

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Exploit-DB entrywebapps2025-06-15
Metasploit moduleexploit/windows/http/php_cgi_arg_injection_rce_cve_2024_4577PHP CGI Argument Injection Remote Code Executionexploit2024-06-06
Nuclei detection templateNuclei template CVE-2024-4577 —
Proof-of-concept repository on GitHubstars:752024-06-07
Proof-of-concept repository on GitHubstars:02024-06-07
Proof-of-concept repository on GitHubstars:02024-06-07
Proof-of-concept repository on GitHubstars:432024-06-07
Proof-of-concept repository on GitHubstars:3212024-06-07
Proof-of-concept repository on GitHubstars:212024-06-07
Proof-of-concept repository on GitHubstars:12024-06-07
Proof-of-concept repository on GitHubstars:12024-06-07
Proof-of-concept repository on GitHubstars:12024-06-07

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. Metasploit-4 d
  2. First PoC-3 d
  3. Published
  4. CISA KEV+2 d
  5. TodaySep 29, 2026+842 d
EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

  • CVE-2024-55850 days apartCommand injection via array-ish $command parameter of proc_open() (bypass CVE-2024-1874 fix)
    44Plan
  • CVE-2024-8926121 days apartPHP CGI Parameter Injection Vulnerability (CVE-2024-4577 bypass)
    36Monitor

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

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

nvd-primary

Root cause

User input is inserted as text into a shell command. The shell may interpret special characters in the input as part of the command.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const host = req.body.host;exec("ping -c 1 " + host, onResult);

Fixed

ts
const host = req.body.host;if (!/^[a-z0-9.-]{1,253}$/i.test(host)) return res.sendStatus(400);execFile("ping", ["-c", "1", host], onResult);

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records