CVE-2012-1823

CRITICAL(9.8)KEVLikely Exploited

PHP-CGI Query String Parameter Vulnerability

Description

CVE-2012-1823 is a critical command injection vulnerability affecting PHP PHP (versions < 5.3.12; >= 5.4.0, < 5.4.2). sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code. CISA has added CVE-2012-1823 to the Known Exploited Vulnerabilities catalog, confirming active exploitation in the wild. With an EPSS score of 94.39% (100.0th percentile), this vulnerability has a very high probability of being exploited.

KEV Information

Vendor
PHP
Product
PHP
Date Added
March 25, 2022
Due Date
April 15, 2022
Required Action
Apply updates per vendor instructions.

CVSS Score

Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in Calculator
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
Exploitability Score
3.9
Impact Score
5.9

CWEs

Affected Products

VendorProductVersion
phpphp< 5.3.12; >= 5.4.0, < 5.4.2
fedoraprojectfedora39; 40
debiandebian linux6.0
hphp-uxb.11.23; b.11.31
opensuseopensuse11.4; 12.1
suselinux enterprise server10; 11
suselinux enterprise software development kit10; 11
applemac os x>= 10.6.8, < 10.7.5; >= 10.8.0, < 10.8.2
redhatapplication stack2.0
redhatgluster storage server for on-premise2.0
redhatstorage2.0
redhatstorage for public cloud2.0
redhatenterprise linux desktop6.0
redhatenterprise linux eus5.6; 6.1; 6.2
redhatenterprise linux server5.0; 6.0
redhatenterprise linux server aus5.3; 5.6
redhatenterprise linux workstation5.0; 6.0

References

Weakness Type

CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Command Injection is a critical vulnerability that occurs when software constructs all or part of a command using externally-influenced input from an upstream component, but fails to neutralize or incorrectly neutralizes special elements that could modify the intended command when executed. This allows attackers to inject malicious commands that are executed by the underlying system with the same privileges as the vulnerable application. In the case of CVE-2012-1823, this weakness manifests in PHP PHP where sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.

Learn more: CWE-77 — Improper Neutralization of Special Elements used in a Command ('Command Injection')

Impact Analysis

CVE-2012-1823 poses a critical threat to organizations running PHP PHP, with a CVSS score of 9.8 reflecting maximum impact across confidentiality, integrity, and availability. Successful exploitation can fully compromise the confidentiality, integrity, and availability of affected systems. Attackers can access sensitive data, modify system configurations or data, and disrupt service availability. The network-based attack vector requiring no authentication makes this vulnerability particularly accessible to opportunistic attackers and automated scanning tools.

Exploit Maturity

CVE-2012-1823 is listed in the CISA Known Exploited Vulnerabilities catalog, confirming real-world exploitation. The EPSS score of 94.39% (100.0th percentile) places it among the most likely vulnerabilities to be exploited, reflecting widespread and active exploitation activity. Public exploit code is available, lowering the barrier for attackers and increasing the urgency to patch. Despite being over 14 years old, this vulnerability continues to be relevant due to the persistence of unpatched legacy systems in production environments.

Remediation

  1. Apply vendor patches immediately as required by CISA KEV: Apply updates per vendor instructions. Upgrade PHP PHP from affected versions (< 5.3.12; >= 5.4.0, < 5.4.2) to the latest patched release.
  2. If immediate patching is not possible, restrict network access to the affected PHP service using firewall rules, ACLs, or network segmentation to limit exposure to trusted networks only.
  3. Monitor affected systems for signs of compromise by reviewing security logs for anomalous activity, unauthorized access attempts, and unexpected system changes related to PHP.
  4. Evaluate whether affected PHP PHP deployments are still within vendor support. End-of-life systems should be prioritized for migration to supported alternatives.
  5. Review and update your organization's vulnerability management process to ensure CISA KEV entries with a remediation deadline of 2022-04-15 are addressed within the required timeframe.

Technical Details

CVE-2012-1823 is classified under CWE-77 (Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting PHP PHP in versions < 5.3.12; >= 5.4.0, < 5.4.2. sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code. The vulnerability is exploitable remotely over the network, with low attack complexity, requiring no prior authentication. The CVSS 3.1 base score of 9.8 (CRITICAL) reflects high confidentiality impact, high integrity impact, and high availability impact.

Frequently Asked Questions

Is CVE-2012-1823 being actively exploited?

Yes. CVE-2012-1823 is listed in the CISA Known Exploited Vulnerabilities catalog, confirming active exploitation in the wild. The EPSS score of 94.39% (100.0th percentile) indicates a very high probability of exploitation. Public exploit code is available, further increasing the risk.

What products are affected by CVE-2012-1823?

CVE-2012-1823 primarily affects PHP PHP, as well as Fedoraproject Fedora, Debian Debian Linux, Hp Hp-ux. The affected versions include < 5.3.12; >= 5.4.0, < 5.4.2. Organizations should check whether any instances of the affected software are running in their environment.

How do I fix CVE-2012-1823?

Apply updates per vendor instructions. Specifically, upgrade from the affected versions (< 5.3.12; >= 5.4.0, < 5.4.2) to the latest patched release from PHP. As an interim measure, restrict network access to the affected service to trusted networks only.

How severe is CVE-2012-1823?

CVE-2012-1823 has a CVSS 3.1 score of 9.8, rated CRITICAL. This critical rating reflects the vulnerability's potential for complete system compromise. The inclusion in the CISA KEV catalog means organizations are required to remediate this vulnerability within the specified deadline.

CVSS Score

9.8
CRITICAL(9.8)

EPSS Score

EPSS Score100.00%
EPSS Percentile100.0%

Dates

PublishedMay 11, 2012
Last ModifiedJune 16, 2026
StatusAnalyzed
CVSS Versionv3.1

Need Help With Vulnerability Management?

Our security experts can help you prioritize and remediate vulnerabilities effectively.