Skip to content
OpenAdvisories
Critical · 9.8 Known exploited · Ransomware Scanner template Public exploit CVE-2024-4577 EUVD-2024-44188GHSA-vxpp-6299-mxw3

Argument Injection in PHP-CGI

Published Jun 9, 2024 · Updated Oct 21, 2025 · Assigned by php

Description

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.

Affected products

VendorProductAffectedFixed
PHP Group PHP 8.1.* – < 8.1.29, 8.2.* – < 8.2.20, 8.3.* – < 8.3.8 8.1.29

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Tumbleweed php8 8.3.12-1.1 openSUSE-SU-2024:14376-1
ReleasePackageFixed inAdvisory
Alpine v3.19 php81 8.1.29-r0 —
Alpine v3.19 php82 8.2.20-r0 —
Alpine v3.19 php83 8.3.8-r0 —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 php 8.3.8-1 —
Azure Linux 2 (CBL-Mariner) php 8.1.29-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling php-8.1 8.1.29-r0 —
Wolfi rolling php-8.2 8.2.20-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 73 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Advisories 6

References