CVE-2012-1823Php Command Injection
NVDCVSS scored by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Vulnerability Summary
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.
CVSS v3.1 Base Metrics — Score 9.8 (CRITICAL)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAttack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh
Affected & Patched Versions
- Php < 5.3.12
- Php >= 5.4.0 and < 5.4.2
- Fedoraproject Fedora
- Debian Linux
- Hp-ux
- Opensuse
- Suse Linux Enterprise Server
- Suse Linux Enterprise Software Development Kit
- Apple Mac Os X >= 10.6.8 and < 10.7.5
- Apple Mac Os X >= 10.8.0 and < 10.8.2
- Redhat Application Stack
- Redhat Gluster Storage Server For On-premise
- Redhat Storage
- Redhat Storage For Public Cloud
- Redhat Enterprise Linux Desktop
- Redhat Enterprise Linux Eus
- Redhat Enterprise Linux Server
- Redhat Enterprise Linux Server Aus
- Redhat Enterprise Linux Workstation
- Php 5.3.12
- Php 5.4.2
- Apple Mac Os X 10.7.5
- Apple Mac Os X 10.8.2
What to do
Patch now. CISA lists this flaw as exploited in the wild and set a federal remediation deadline of Apr 15, 2022.
- Check whether you run Php and which version.
- Update to a patched version listed above, then confirm the new version.
- Review logs and exposed services for signs of earlier compromise.
CISA required action: Apply updates per vendor instructions.
CISA KEV Status
Listed in Known Exploited Vulnerabilities
Added: Mar 25, 2022
Remediation due: Apr 15, 2022 (deadline passed)
Remediation due: Apr 15, 2022 (deadline passed)
Timeline
- May 11, 2012Published
- Mar 25, 2022Added to CISA KEV catalog
- Apr 15, 2022KEV remediation due date
- Apr 21, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new Php CVEsYou are reading CVE-2012-1823. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Exploithttp://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- Referencehttp://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
- Advisoryhttp://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- Referencehttp://marc.info/?l=bugtraq&m=134012830914727&w=2
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0546.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0547.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0568.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0569.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0570.html
- Referencehttp://secunia.com/advisories/49014
- Referencehttp://secunia.com/advisories/49065
- Referencehttp://secunia.com/advisories/49085
- Referencehttp://secunia.com/advisories/49087
- Advisoryhttp://support.apple.com/kb/HT5501
- Vendor Advisoryhttp://www.debian.org/security/2012/dsa-2465
- Exploithttp://www.kb.cert.org/vuls/id/520827
- Advisoryhttp://www.kb.cert.org/vuls/id/673343
- Vendor Advisoryhttp://www.mandriva.com/security/advisories?name=MDVSA-2012:068
- Advisoryhttp://www.openwall.com/lists/oss-security/2024/06/07/1
- Exploithttp://www.php.net/ChangeLog-5.php#5.4.2
- Referencehttp://www.php.net/archive/2012.php#id2012-05-03-1
- Advisoryhttp://www.securitytracker.com/id?1027022
- Exploithttps://bugs.php.net/bug.php?id=61910
- Patchhttps://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- Exploithttp://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
- Referencehttp://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
- Advisoryhttp://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
- Advisoryhttp://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
- Referencehttp://marc.info/?l=bugtraq&m=134012830914727&w=2
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0546.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0547.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0568.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0569.html
- Advisoryhttp://rhn.redhat.com/errata/RHSA-2012-0570.html
- Referencehttp://secunia.com/advisories/49014
- Referencehttp://secunia.com/advisories/49065
- Referencehttp://secunia.com/advisories/49085
- Referencehttp://secunia.com/advisories/49087
- Advisoryhttp://support.apple.com/kb/HT5501
- Vendor Advisoryhttp://www.debian.org/security/2012/dsa-2465
- Exploithttp://www.kb.cert.org/vuls/id/520827
- Advisoryhttp://www.kb.cert.org/vuls/id/673343
- Vendor Advisoryhttp://www.mandriva.com/security/advisories?name=MDVSA-2012:068
- Advisoryhttp://www.openwall.com/lists/oss-security/2024/06/07/1
- Exploithttp://www.php.net/ChangeLog-5.php#5.4.2
- Referencehttp://www.php.net/archive/2012.php#id2012-05-03-1
- Advisoryhttp://www.securitytracker.com/id?1027022
- Exploithttps://bugs.php.net/bug.php?id=61910
- Patchhttps://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
- Advisoryhttps://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-1823
Data last checked: Nov 24, 2026 09:23 UTC