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

Source: https://junglewise.ai/threats/cve-2012-1823-php-cgi-query-string-parameter-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-03-25. Updated: 2026-05-10  
License: CC BY 4.0 with a link back

CVE-2012-1823 · Severity: critical · CVSS 9.8 · Exploited in the wild · Published 2022-03-25

PHP-CGI (sapi/cgi/cgi_main.c) fails to properly handle query strings lacking an equals sign, allowing remote attackers to pass command-line options to the PHP interpreter. This flaw can be leveraged to execute arbitrary code on the host system.

Technologies: [PHP Group PHP](https://junglewise.ai/threats/technologies/php). Vendors: [PHP Group](https://junglewise.ai/threats/vendors/php-group).

## Quick answers

**Is CVE-2012-1823 exploited in the wild?** Yes. CVE-2012-1823 is known to be exploited in the wild, first recorded on 25 March 2022. Treat it as urgent.

**How severe is CVE-2012-1823?** Critical severity, with a CVSS score of 9.8, published 25 March 2022.

**Which products and versions are affected?** PHP Group PHP before 5.3.12, 5.4.x before 5.4.2.

**Is there a fix for CVE-2012-1823?** A patch was published on 2012-05-03: PHP 5.4.2 released with fix. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2012-1823 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2012-1823?** Check whether you run PHP Group PHP. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Affected products

- PHP Group PHP before 5.3.12, 5.4.x before 5.4.2

## Timeline

- 2012-05-03: patched: PHP 5.4.2 released with fix.
- 2022-03-25: kev added: Added to CISA Known Exploited Vulnerabilities Catalog.

## Related threats

- [PHP use-after-free in global state handling](https://junglewise.ai/threats/cve-2026-109619-php-has-various-global-state-that-temporarily-points-into)
- [PHP Memory Corruption Vulnerability](https://junglewise.ai/threats/cve-2026-109618-gcp-2026-070)
- [PHP Phar uncontrolled recursion in phar_get_link_source](https://junglewise.ai/threats/cve-2026-7260-php-phar-uncontrolled-recursion-in-phar-get-link-source)
- [PHP BCMath out-of-bounds write in bccomp](https://junglewise.ai/threats/cve-2026-17544-php-bcmath-out-of-bounds-write-in-bccomp)
- [PHP ext-pgsql SQL injection in pg_select and related functions](https://junglewise.ai/threats/cve-2026-17543-php-ext-pgsql-sql-injection-in-pg-select-and-related-functions)
