Vulnerabilities / CVE-2024-4577

critical

CVE-2024-4577

php: Argument Injection in PHP-CGI

Published Modified CWE 78
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Red Hat, Azure Linux, Bitnami, CBL-Mariner.

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 packages and fixed versions

SourcePackageFixed in
Azure Linux 3.0php0:8.3.8-1.azl3
bitnami::Bitnami Vulnerability Databaselibphp, php, php-min8.1.29, 8.2.20, 8.3.8
CBL-Mariner 2.0php0:8.1.29-1.cm2
alpine 3.19php81, php82, php838.1.29-r0 and 2 more
chainguardphp-8.1, php-8.28.1.29-r0 and 1 more
echophp-7.27.2.34+e1
wolfiphp-8.1, php-8.28.1.29-r0 and 1 more
Show all 13 entries from 7 sources
SourcePackageFixed in
Azure Linux 3.0php0:8.3.8-1.azl3
bitnami::Bitnami Vulnerability Databaselibphp8.1.29, 8.2.20, 8.3.8
bitnami::Bitnami Vulnerability Databasephp8.1.29, 8.2.20, 8.3.8
bitnami::Bitnami Vulnerability Databasephp-min8.1.29, 8.2.20, 8.3.8
CBL-Mariner 2.0php0:8.1.29-1.cm2
alpine 3.19php818.1.29-r0
alpine 3.19php828.2.20-r0
alpine 3.19php838.3.8-r0
chainguardphp-8.18.1.29-r0
chainguardphp-8.28.2.20-r0
echophp-7.27.2.34+e1
wolfiphp-8.18.1.29-r0
wolfiphp-8.28.2.20-r0

References

All 27 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.