Summary
generated automatically from NVD dataPHP's CGI mode (php-cgi), implemented in sapi/cgi/cgi_main.c, mishandles query strings that contain no equals sign. A remote attacker can place command-line options in the query string, because a certain php_getopt step for the 'd' case is not skipped, and this lets them execute arbitrary code. The flaw affects PHP before 5.3.12 and 5.4.x before 5.4.2, is listed in CISA's KEV catalog as exploited, and carries a CVSS v3.1 score of 9.8 (CRITICAL).
NVD description
sapi/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 query strings that lack an = (equals sign) character, which allows remote attackers to execute arbitrary code by placing command-line options in the query string, related to lack of skipping a certain php_getopt for the 'd' case.
⚠️ Actively exploited — CISA KEV
This CVE was added to CISA's Known Exploited Vulnerabilities catalog on 2022-03-25. It is confirmed exploited in the wild and must be patched as a priority.
Remediation deadline (US federal agencies): 2022-04-15
EPSS · FIRST.org
100.0%probability of exploitation in the next 30 days
Higher than 99% of scored CVEs
EPSS (Exploit Prediction Scoring System) estimates, from observed exploitation activity, how likely a CVE is to be exploited in the next 30 days. It complements CVSS, which measures severity, not likelihood. Score of 2026-10-18, recomputed daily by FIRST.org.
CVSS v3.1 Score
Information
- Published
- 11 mai 2012
- Updated
- 16 juin 2026
- Status
- Analyzed
- Source
- cret@cert.org
Affected products
Weaknesses (CWE)
References (60)
- http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/Broken LinkExploit
- http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.htmlMailing ListThird Party Advisory
- http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.htmlMailing ListThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0546.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0547.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0568.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0569.htmlThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2012-0570.htmlThird Party Advisory
- http://secunia.com/advisories/49014Broken Link
- http://secunia.com/advisories/49065Broken Link
- http://secunia.com/advisories/49085Broken Link
- + 45 more references on NVD
Similar CVEs
Other vulnerabilities of type CWE-77
Monitor your products
Get automatic alerts for every new CVE affecting your equipment.