9.8

CVE-2012-1823: PHP-CGI Query String Parameter Vulnerability

KEV
Analyzed
AliasesRHSA-2012:0546RHSA-2012:0547RHSA-2012:0568
Published 11-05-2012Last modified 04-11-2025

Vulnerability summary

CVE-2012-1823 is a critical (CVSS 9.8) vulnerability in PHP. It is known to be exploited: CISA lists it, first on 25-03-2022. EPSS estimates a 100.00% chance of exploitation in the next 30 days, higher than 99.9% of scored vulnerabilities. 9 public exploits are recorded.

Priority
Act nowlisted as exploited

Listed as exploited by CISA (25-03-2022)

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (CVE.org)
EPSS score
100.00%
0%100%
Critical · 0.00 pp in 30 days
KEVExploited in the wildCritical · listed in 1 catalog
RansomwareNot flaggedNo ransomware use recorded.
Public exploits9reference, exploit-database, metasploit

Advisory lineage

Upstream 0 · Downstream 4 · Related 3

Timeline

  1. 11-05-2012
    PublishedVulnerability first disclosed.
  2. 25-03-2022
    Added to CISA KEVExploitedPHP-CGI Query String Parameter Vulnerability
  3. 15-04-2022
    CISA remediation dueDeadline passedApply updates per vendor instructions.
  4. 04-11-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

3 scores · 2 sources · 2 versions

EPSS trend

Probability

100.00%

Chance of exploitation in the next 30 days

Percentile

100%

Versus all other CVEs

30-day change

No change 0.00 pp

From 100.00% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEVListed
Added
25-03-2022
Federal due date
15-04-2022
ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

CISA required action

Apply updates per vendor instructions. nvd.nist.gov/vuln/detail/CVE-2012-1823

Public exploits

9 found
  • referenceUnverified

    Exploit Reference (php.net)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (bugs.php.net)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (eindbazen.net)

    Maturity: unknown

Show all 9 exploits
  • referenceUnverified

    Exploit Reference (kb.cert.org)

    Maturity: unknown

  • exploit-databaseremotephpVerified

    Apache + PHP < 5.3.12 / < 5.4.2 - cgi-bin Remote Code Execution

    Maturity: weaponized

  • exploit-databaseremotephpUnverified

    Apache + PHP < 5.3.12 / < 5.4.2 - Remote Code Execution + Scanner

    Maturity: poc

  • exploit-databaseremotephpVerified

    PHP 5.3.12/5.4.2 - CGI Argument Injection (Metasploit)

    Maturity: weaponized

  • exploit-databaseremotephpVerified

    PHP < 5.3.12 / < 5.4.2 - CGI Argument Injection

    Maturity: weaponized

  • MetasploitMetasploitremoteVerified

    PHP CGI Argument Injection

    exploit/multi/http/php_cgi_arg_injection

    Maturity: weaponized

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat59 products
Suse2 products
Apple1 product
  • mac_os_x≥ 10.6.8, < 10.7.5 | ≥ 10.8.0, < 10.8.2
Debian1 product
Fedoraproject1 product
Hp1 product
Opensuse1 product
Php1 product
  • php< 5.3.12 | ≥ 5.4.0, < 5.4.2

8 vendors · 67 products

References

47 links
Show all 47 references