CISA KEV · Known exploitedCritical

CVE-2012-1823

PHP

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
9.8
EPSS
100.0%
100.0% percentile
CISA KEV
Listed
Published
2012.05.11
PRIORITY ASSESSMENT

Immediate review

CISA has listed this vulnerability in the Known Exploited Vulnerabilities catalog.

Known exploitationConfirmed by CISA KEV
Exploit probability100.0%
Technical severityCVSS 9.8

Vulnerability overview

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.

Affected product and versions

Product
PHP
Affected versions
< 5.3.12, >= 5.4.0 < 5.4.2, 39, 40, 6.0, b.11.23, b.11.31, 11.4, 12.1, 10, 11, >= 10.6.8 < 10.7.5, >= 10.8.0 < 10.8.2, 2.0, 5.6, 6.1, 6.2, 5.0, 5.3
Fixed versions
5.3.12, 5.4.2, 10.7.5, 10.8.2

Recommended response sequence

Confirm exposure before applying a vendor-supported change.

Full remediation guide
CISA required action

Apply updates per vendor instructions.

Due date: 2022.04.15
  1. 1
    Identify

    Confirm that PHP and an affected version are present.

  2. 2
    Prioritize

    Combine exploitation signals with asset exposure and business criticality.

  3. 3
    Remediate

    Follow the vendor advisory or supported update path and preserve rollback options.

  4. 4
    Verify

    Recheck the version, service health, access paths, and relevant logs.

Technical data

CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE
CWE-20, CWE-77
KEV added
2022.03.25
Ransomware use
미확인