What is CVE-2012-1823?
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.
The record classifies CVE-2012-1823 under weakness class CWE-77. Its CVSS v3 base vector states that the flaw is reachable remotely over the network, needs no prior authentication, needs no user interaction, and has high impact on confidentiality, integrity, availability. 17 affected-product entries are recorded, across 1 vendor, listed below. The identifier was first published 5284 days ago.
Severity and exploitation probability
- CVSS v3.1 base score
- 9.8 — CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - EPSS (FIRST)
- 99.9% probability of exploitation in the next 30 days, higher than 99.9% of all scored CVEs
- CISA KEV
- Listed since 2022-03-25, federal remediation deadline 2022-04-15
- Threadlinqs priority
- 9/10 — CISA KEV-listed, which Threadlinqs floors at 9
- Published
- 2012-05-11, last modified 2025-11-04
Is CVE-2012-1823 being exploited?
CISA added CVE-2012-1823 to the Known Exploited Vulnerabilities catalog on 2022-03-25, which means the agency holds evidence of exploitation in the wild; US federal civilian agencies had to remediate it by 2022-04-15 under BOD 22-01. Weaponised exploit code for CVE-2012-1823 is publicly available. 11 public proof-of-concept repositories are tracked for this identifier. A ProjectDiscovery Nuclei detection template exists (http/cves/2012/CVE-2012-1823.yaml). It currently carries a trending score of 50 in the Threadlinqs vulnerability feed.
- 0xl0k1/CVE-2012-1823 (github)
- Unix13/metasploitable2 (github)
- tardummy01/oscp_scripts-1 (github)
- drone789/CVE-2012-1823 (github)
- cyberharsh/PHP_CVE-2012-1823 (github)
- Dmitri131313/CVE-2012-1823-exploit-for-https-user-password-web (github)
- hackherMind-Pixel/Vulnerable-Lab-Exploitation (github)
- mujtaba815/metasploitable2-php-cgi-exploit (github)
Affected products and versions
- (vendor unspecified): redhat:enterprise_linux_server, redhat:application_stack, redhat:enterprise_linux_eus, suse:linux_enterprise_software_development_kit, redhat:enterprise_linux_workstation, apple:mac_os_x, fedoraproject:fedora, opensuse:opensuse, redhat:enterprise_linux_server_aus, redhat:gluster_storage_server_for_on-premise, redhat:storage, suse:linux_enterprise_server, php:php, redhat:storage_for_public_cloud, redhat:enterprise_linux_desktop, debian:debian_linux, hp:hp-ux
How to fix CVE-2012-1823
Because CVE-2012-1823 is KEV-listed, US federal civilian agencies were required to apply the vendor fix, or stop using the product, by 2022-04-15. No vendor patch reference has been recorded for CVE-2012-1823 in the tracked sources. Follow the references below for a fix, and treat the products listed above as exposed until the vendor states otherwise.
Threat activity tracking CVE-2012-1823
1 tracked threat in the Threadlinqs corpus references CVE-2012-1823, either in the campaign’s CVE list or as an indicator on the campaign record.
Sources
Enriched from CVE.org, FIRST EPSS, CISA KEV, GitHub Security Advisories, public proof-of-concept repositories, ProjectDiscovery Nuclei. Last verified by Threadlinqs on .
Vendor advisory and patch
- marc.info — vendor advisory
- lists.opensuse.org — vendor advisory
- h20000.www2.hp.com — vendor advisory
- mandriva.com — vendor advisory
- lists.opensuse.org — vendor advisory (msg00002)
Third-party advisory
- secunia.com — third party advisory
- kb.cert.org — third party advisory
- secunia.com — third party advisory (49065)
Vulnerability database entry
Other references
Showing 14 of 21 recorded references.