# 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 al…

CVE record · `CVE-2012-1823`

- **Identifiers:** `CVE-2012-1823`
- **State:** Confirmed
- **Severity:** CVSS 9.8 Critical
- **Critical:** Yes: KEV, CVSS 9+, CVSS 7+ and EPSS
- **CNA:** certcc
- **Weakness (CWE):** [CWE-77](https://cwe.mitre.org/data/definitions/77.html)
- **Tags:** [Command injection](https://agentprime.io/advisories/tag/command-injection.md)
- **Published:** 11 May 2012
- **Updated:** 4 Nov 2025
- **Reviewed by a person:** No

Published by the CVE Program (CNA: certcc) at 11 May 2012, 10:00 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Critical

Critical, because:

- In CISA’s KEV catalogue since 25 Mar 2022: it is known to be exploited.
- CVSS score 9.8: 9.0 or more.
- CVSS score 9.8 (7.0 or more) and EPSS 1.00 (0.1 or more): a high score and a real chance of exploitation in the next 30 days.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected products, as the CNA wrote them

- Vendor: Not given. Product: Not given.
  - affected: `n/a`

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 9.8 Critical, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`, from ADP (CISA-ADP)

- **CISA KEV:** Listed since 25 Mar 2022: known to be exploited.
- **EPSS:** 1.00, the 99th percentile, on 23 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the CVE Program, published 11 May 2012. New records show when each source confirmed them.

## Sources

- [CVE List: CVE-2012-1823](https://www.cve.org/CVERecord?id=CVE-2012-1823)
- [NVD: CVE-2012-1823](https://nvd.nist.gov/vuln/detail/CVE-2012-1823)

### References from the CNA

- <http://marc.info/?l=bugtraq&m=134012830914727&w=2> (vendor-advisory)
- <http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html> (vendor-advisory)
- <http://www.securitytracker.com/id?1027022> (vdb-entry)
- <http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041> (vendor-advisory)
- <http://www.mandriva.com/security/advisories?name=MDVSA-2012:068> (vendor-advisory)
- <http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html> (vendor-advisory)
- <http://rhn.redhat.com/errata/RHSA-2012-0546.html> (vendor-advisory)
- <http://rhn.redhat.com/errata/RHSA-2012-0568.html> (vendor-advisory)
- <http://rhn.redhat.com/errata/RHSA-2012-0569.html> (vendor-advisory)
- <http://www.php.net/ChangeLog-5.php#5.4.2>
- <http://secunia.com/advisories/49014> (third-party-advisory)
- <http://rhn.redhat.com/errata/RHSA-2012-0570.html> (vendor-advisory)
- <http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html> (vendor-advisory)
- <https://bugs.php.net/bug.php?id=61910>
- <http://www.kb.cert.org/vuls/id/673343> (third-party-advisory)
- <http://rhn.redhat.com/errata/RHSA-2012-0547.html> (vendor-advisory)
- <http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html> (vendor-advisory)
- <http://support.apple.com/kb/HT5501>
- <http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/>
- <http://secunia.com/advisories/49065> (third-party-advisory)
- <http://www.kb.cert.org/vuls/id/520827> (third-party-advisory)
- <https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1>
- <http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041> (vendor-advisory)
- <http://marc.info/?l=bugtraq&m=134012830914727&w=2> (vendor-advisory)
- <http://www.debian.org/security/2012/dsa-2465> (vendor-advisory)
- <http://secunia.com/advisories/49085> (third-party-advisory)
- <http://www.php.net/archive/2012.php#id2012-05-03-1>
- <http://secunia.com/advisories/49087> (third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/06/07/1> (mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/> (vendor-advisory)

And 1 more on the CVE record.

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2012-1823>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2012-1823/>. Everything for agents: <https://agentprime.io/llms.txt>.
