Vulnerability Details : CVE-2012-1823
Public exploit exists!
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.
Vulnerability category: Execute code
Products affected by CVE-2012-1823
- cpe:2.3:o:hp:hp-ux:b.11.23:*:*:*:*:*:*:*
- cpe:2.3:o:hp:hp-ux:b.11.31:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:5.6:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:6.1:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_eus:6.2:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server:5.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_workstation:5.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server_aus:5.3:*:*:*:*:*:*:*
- cpe:2.3:o:redhat:enterprise_linux_server_aus:5.6:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:storage:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:storage_for_public_cloud:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:gluster_storage_server_for_on-premise:2.0:*:*:*:*:*:*:*
- cpe:2.3:a:redhat:application_stack:2.0:*:*:*:*:*:*:*
- cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*
- cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*
- cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:-:*:*
- cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:vmware:*:*
- cpe:2.3:o:suse:linux_enterprise_server:10:sp4:*:*:-:*:*:*
- cpe:2.3:o:suse:linux_enterprise_software_development_kit:10:sp4:*:*:*:*:*:*
- cpe:2.3:o:suse:linux_enterprise_software_development_kit:11:sp2:*:*:*:*:*:*
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*
- cpe:2.3:o:opensuse:opensuse:11.4:*:*:*:*:*:*:*
- cpe:2.3:o:opensuse:opensuse:12.1:*:*:*:*:*:*:*
Threat overview for CVE-2012-1823
Top countries where our scanners detected CVE-2012-1823
Top open port discovered on systems with this issue
80
IPs affected by CVE-2012-1823 205,048
Threat actors abusing to this issue?
Yes
Find out if you* are
affected by CVE-2012-1823!
*Directly or indirectly through your vendors, service providers and 3rd parties.
Powered by
attack surface intelligence
from SecurityScorecard.
CVE-2012-1823 is in the CISA Known Exploited Vulnerabilities Catalog
CISA vulnerability name:
PHP-CGI Query String Parameter Vulnerability
CISA required action:
Apply updates per vendor instructions.
CISA description:
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.
Notes:
https://nvd.nist.gov/vuln/detail/CVE-2012-1823
Added on
2022-03-25
Action due date
2022-04-15
Exploit prediction scoring system (EPSS) score for CVE-2012-1823
95.70%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 100 %
Percentile, the proportion of vulnerabilities that are scored at or less
Metasploit modules for CVE-2012-1823
-
PHP CGI Argument Injection
Disclosure Date: 2012-05-03First seen: 2020-04-26exploit/multi/http/php_cgi_arg_injectionWhen run as a CGI, PHP up to version 5.3.12 and 5.4.2 is vulnerable to an argument injection vulnerability. This module takes advantage of the -d flag to set php.ini directives to achieve code execution. From the advisory: "if there is NO unescaped '=' in t
CVSS scores for CVE-2012-1823
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.5
|
HIGH | AV:N/AC:L/Au:N/C:P/I:P/A:P |
10.0
|
6.4
|
NIST | |
9.8
|
CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
3.9
|
5.9
|
NIST | 2024-07-16 |
CWE ids for CVE-2012-1823
-
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.Assigned by: nvd@nist.gov (Primary)
-
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.Assigned by: nvd@nist.gov (Primary)
References for CVE-2012-1823
-
http://rhn.redhat.com/errata/RHSA-2012-0569.html
RHSA-2012:0569 - Security Advisory - Red Hat Customer PortalThird Party Advisory
-
http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
Apple - Lists.apple.comMailing List;Third Party Advisory
-
http://rhn.redhat.com/errata/RHSA-2012-0570.html
RHSA-2012:0570 - Security Advisory - Red Hat Customer PortalThird Party Advisory
-
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
Broken Link
-
http://www.securitytracker.com/id?1027022
PHP Command Parameter Bug Lets Remote Users Obtain Potentially Sensitive Information and Execute Arbitrary Code - SecurityTrackerBroken Link;Third Party Advisory;VDB Entry
-
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
[security-announce] SUSE-SU-2012:0598-1: critical: Security update for PMailing List;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKGTQUOA2NTZ3RXN22CSAUJPIRUYRB4B/
[SECURITY] Fedora 40 Update: php-8.3.8-1.fc40 - package-announce - Fedora Mailing-ListsMailing List;Release Notes
-
http://www.openwall.com/lists/oss-security/2024/06/07/1
oss-security - PHP security releases 8.3.8, 8.2.20, and 8.1.29Mailing List
-
https://bugs.php.net/bug.php?id=61910
PHP :: Sec Bug #61910 :: VU#520827 - PHP-CGI query string parameter vulnerabilityExploit;Patch
-
http://secunia.com/advisories/49085
Sign inBroken Link
-
http://rhn.redhat.com/errata/RHSA-2012-0568.html
RHSA-2012:0568 - Security Advisory - Red Hat Customer PortalThird Party Advisory
-
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
[security-announce] SUSE-SU-2012:0604-1: critical: Security update for PMailing List;Third Party Advisory
-
http://secunia.com/advisories/49014
Sign inBroken Link
-
http://www.php.net/archive/2012.php#id2012-05-03-1
PHP: News Archive - 2012Release Notes
-
http://www.kb.cert.org/vuls/id/520827
VU#520827 - PHP-CGI query string parameter vulnerabilityExploit;Third Party Advisory;US Government Resource
-
https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1
PHP :: Bug #61910 :: PatchesPatch
-
http://marc.info/?l=bugtraq&m=134012830914727&w=2
'[security bulletin] HPSBUX02791 SSRT100856 rev.1 - HP-UX Apache Web Server running PHP, Remote Execu' - MARCMailing List
-
http://rhn.redhat.com/errata/RHSA-2012-0547.html
RHSA-2012:0547 - Security Advisory - Red Hat Customer PortalThird Party Advisory
-
http://www.mandriva.com/security/advisories?name=MDVSA-2012:068
mandriva.comBroken Link
-
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/W45DBOH56NQDRTOM2DN2LNA2FZIMC3PK/
[SECURITY] Fedora 39 Update: php-8.2.20-1.fc39 - package-announce - Fedora Mailing-ListsMailing List;Release Notes
-
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
[security-announce] openSUSE-SU-2012:0590-1: critical: update for php5Mailing List;Third Party Advisory
-
http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
Broken Link;Exploit
-
http://support.apple.com/kb/HT5501
About the security content of OS X Mountain Lion v10.8.2, OS X Lion v10.7.5 and Security Update 2012-004 - Apple SupportThird Party Advisory
-
http://www.php.net/ChangeLog-5.php#5.4.2
PHP: PHP 5 ChangeLogExploit;Patch;Release Notes
-
http://secunia.com/advisories/49087
Sign inBroken Link
-
http://secunia.com/advisories/49065
Sign inBroken Link
-
http://www.kb.cert.org/vuls/id/673343
VU#673343 - Parallels Plesk Panel phppath/php vulnerabilityThird Party Advisory;US Government Resource
-
http://www.debian.org/security/2012/dsa-2465
Debian -- Security Information -- DSA-2465-1 php5Third Party Advisory
-
http://rhn.redhat.com/errata/RHSA-2012-0546.html
RHSA-2012:0546 - Security Advisory - Red Hat Customer PortalThird Party Advisory
Jump to