CVE-2012-1823: Vulnerability in PHP
Actively exploited. 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.
Exploited in the wild, CWE-77
- Exploitation
- Confirmed 25 Mar 2022
- Severity
- 9.8 of 10
- Attack likelihood
- 100 % in 30 days
- Fix
- Fixed version known
- Patch deadline
- Agencies by 15 Apr 2022
Details
- EU ID
- EUVD-2012-1833
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weakness
- CWE-77
- Published
- 11 May 2012
- Last change
- 16 Jun 2026
- Likelihood rank
- Higher than 100 % of all rated vulnerabilities
- Analysis status
- Analyzed
- Required action
- Apply updates per vendor instructions.
Affected products
Affected versions and the first fixed release
- PHP Before 5.3.12; From 5.4.0 before 5.4.2. Fixed in 5.3.12, 5.4.2
- Fedoraproject Fedora Versions 39, 40. No fixed version recorded
- Debian Linux Version 6.0. No fixed version recorded
- Hp-ux Versions b.11.23, b.11.31. No fixed version recorded
- Opensuse Versions 11.4, 12.1. No fixed version recorded
- SUSE Linux Enterprise Server Versions 10, 11. No fixed version recorded
- SUSE Linux Enterprise Software Development Kit Versions 10, 11. No fixed version recorded
- Apple macOS From 10.6.8 before 10.7.5; From 10.8.0 before 10.8.2. Fixed in 10.7.5, 10.8.2
Advisories
Vendor and security advisories
- h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp
- lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- marc.info
- rhn.redhat.com/errata/RHSA-2012-0546.html
- rhn.redhat.com/errata/RHSA-2012-0547.html
- rhn.redhat.com/errata/RHSA-2012-0568.html
- rhn.redhat.com/errata/RHSA-2012-0569.html
- rhn.redhat.com/errata/RHSA-2012-0570.html
- secunia.com/advisories/49014
Patches and fixes
Updates, commits and release notes
- php.net/archive/2012.php
- bugs.php.net/patch-display.php
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/messag...
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/messag...
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/...
Exploit code
Public exploits and proofs of concept, handle with care
- eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- kb.cert.org/vuls/id/520827
- php.net/ChangeLog-5.php
- bugs.php.net/bug.php
Related
- PHP vulnerabilities Recent advisories, watch this product
- Exploited vulnerabilities Explorer, exploited only