Skip to content
On CISA KEVCritical

CVE-2012-1823PHP Command Injection

php: command line arguments injection when run in CGI mode (VU#520827)

Published May 3, 2012 · Updated Mar 9, 2026

Key Facts

Patch immediately
  • CVE-2012-1823 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting PHP, Application Stack (Redhat), Gluster Storage Server For On-Premise (Redhat) and 22 more products.
  • It is exploited in the wild, listed in CISA KEV, Industry KEV feed, CIRCL KEV, ENISA EUVD since Jun 19, 2012. A public exploit is reported by tracking sources, but no code link is listed yet.
  • EPSS estimates a 100% probability of exploitation in the next 30 days.
  • Fixed versions are available, including apache2-mod_php5 5.6.28-1.1, apache2-mod_php7 7.0.14-1.4, Mac OS X 10.7.5.
  • Brandefense priority: patch immediately, because it is listed as exploited in the wild.

Scores

CVSS v3.1

9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS (30-day exploit likelihood)

100%

Higher than 99.9% of all scored CVEs

Exploit maturity

Exploited (KEV)

ATLAS score

86/100

Publication score, see How it works

Exploitation Verdict

KEV listed

Mar 25, 2022

3613 days after publication

Federal due date

Apr 15, 2022

Overdue

Ransomware use

Not reported

Attributed actors

Exploit & Defence Guidance

Exploit maturity

Exploited (KEV)

Public exploit code

5

Proof-of-concept links

In-the-wild evidence

14

Reports of active use

Required action (CISA): Apply updates per vendor instructions.

Advisories And Exploit References

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.

Known-Exploited Catalog Listings

CatalogAddedRemediation dueRansomware use
CISA KEVMar 25, 2022Apr 15, 2022Not reported
Industry KEV feedJun 19, 2012Apr 15, 2022Not reported
CIRCL KEVMar 25, 2022Apr 15, 2022Not reported
ENISA EUVDMar 25, 2022n/aNot reported

Required action: Apply updates per vendor instructions.

Affected Products

300 affected entries in total
ProductAffected versionsFixed in
PHPPHPSee advisory5.3.12
Application StackRedhat2.0n/a
Gluster Storage Server For On-PremiseRedhat2.0n/a
StorageRedhat2.0n/a
Storage For Public CloudRedhat2.0n/a
20 more affected products in the full CVE brief

Patched Releases

apache2-mod_php5

5.6.28-1.1

apache2-mod_php7

7.0.14-1.4

Mac OS X

10.7.5

PHP

0:5.1.6-34.el5_8, 0:5.3.3-3.el6_1.4, 5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8, 5.3.12

php-bcmath

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-cli

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-common

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-dba

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-devel

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-embedded

5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-enchant

5.3.3-3.el6_2.8

php-fpm

5.3.13-1.20.amzn1

php-gd

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-imap

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-intl

5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-ldap

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-mbstring

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-mcrypt

5.3.13-1.20.amzn1

php-mssql

5.3.13-1.20.amzn1

php-mysql

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-mysqlnd

5.3.13-1.20.amzn1

php-ncurses

5.1.6-34.el5_8

php-odbc

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-pdo

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

php-pgsql

5.1.6-34.el5_8, 5.3.13-1.20.amzn1, 5.3.3-3.el6_2.8

Timeline

  1. Publicly disclosed

    May 3, 2012

  2. Added to Industry KEV feed

    Jun 19, 2012

  3. Added to CISA KEV

    Mar 25, 2022

  4. Added to CIRCL KEV

    Mar 25, 2022

  5. Added to ENISA EUVD

    Mar 25, 2022

  6. Last updated

    Mar 9, 2026

Weakness Type

  • CWE-77 Improper Neutralization of Special Elements used in a Command

References

15 more references in the full CVE brief

FAQ

Common Questions.

Is CVE-2012-1823 On Your Attack Surface?

Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.

Request A Demo

More vulnerabilities

Figures as of Dec 2, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.