Read the docs
TI-2012-01607 Aliases CVE-2012-1823GHSA-3p37-hv77-x3rp

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI…

Priority CRITICAL 100Exploited in the wildCWE-77Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and Red Hat. Impact type from CWE-77.

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.

Why it matters now

Exploitation Active In CISA KEV since 2022-03-25CISA due date 2022-04-15
EPSS 0.99998 99th percentileScored 2026-11-07
Public exploit Yes 4 exploit referencesTagged by NVD
Fix Fixed Red Hat: 5 advisories

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Active
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
——all versions—No fix listedCNA
  • — Vendor— Affected all versions Fixed in — No fix listed CNA

CPE configurations NVD · 28

CPEVersionsRoleVendor
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*before 5.3.12; 5.4.0 to before 5.4.2VulnerablePHP
cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:*39VulnerableFedoraproject
cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:*40VulnerableFedoraproject
cpe:2.3:o:debian:debian_linux:6.0:*:*:*:*:*:*:*6.0VulnerableDebian
cpe:2.3:o:hp:hp-ux:b.11.23:*:*:*:*:*:*:*b.11.23VulnerableHewlett Packard Enterprise
cpe:2.3:o:hp:hp-ux:b.11.31:*:*:*:*:*:*:*b.11.31VulnerableHewlett Packard Enterprise
cpe:2.3:o:opensuse:opensuse:11.4:*:*:*:*:*:*:*11.4VulnerableopenSUSE
cpe:2.3:o:opensuse:opensuse:12.1:*:*:*:*:*:*:*12.1VulnerableopenSUSE
cpe:2.3:o:suse:linux_enterprise_server:10:sp4:*:*:-:*:*:*10 sp4VulnerableSUSE
cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:-:*:*11 sp2VulnerableSUSE
  • cpe:2.3:a:php:php:*:*:*:*:*:*:*:* Versions before 5.3.12; 5.4.0 to before 5.4.2 Vulnerable ·PHP
  • cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* Versions 39 Vulnerable ·Fedoraproject
  • cpe:2.3:o:fedoraproject:fedora:40:*:*:*:*:*:*:* Versions 40 Vulnerable ·Fedoraproject
  • cpe:2.3:o:debian:debian_linux:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Debian
  • cpe:2.3:o:hp:hp-ux:b.11.23:*:*:*:*:*:*:* Versions b.11.23 Vulnerable ·Hewlett Packard Enterprise
  • cpe:2.3:o:hp:hp-ux:b.11.31:*:*:*:*:*:*:* Versions b.11.31 Vulnerable ·Hewlett Packard Enterprise
  • cpe:2.3:o:opensuse:opensuse:11.4:*:*:*:*:*:*:* Versions 11.4 Vulnerable ·openSUSE
  • cpe:2.3:o:opensuse:opensuse:12.1:*:*:*:*:*:*:* Versions 12.1 Vulnerable ·openSUSE
  • cpe:2.3:o:suse:linux_enterprise_server:10:sp4:*:*:-:*:*:* Versions 10 sp4 Vulnerable ·SUSE
  • cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:-:*:* Versions 11 sp2 Vulnerable ·SUSE
Show 18 more CPE
CPEVersionsRoleVendor
cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:vmware:*:*11 sp2VulnerableSUSE
cpe:2.3:o:suse:linux_enterprise_software_development_kit:10:sp4:*:*:*:*:*:*10 sp4VulnerableSUSE
cpe:2.3:o:suse:linux_enterprise_software_development_kit:11:sp2:*:*:*:*:*:*11 sp2VulnerableSUSE
cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:*10.6.8 to before 10.7.5; 10.8.0 to before 10.8.2VulnerableApple
cpe:2.3:a:redhat:application_stack:2.0:*:*:*:*:*:*:*2.0VulnerableRed Hat
cpe:2.3:a:redhat:gluster_storage_server_for_on-premise:2.0:*:*:*:*:*:*:*2.0VulnerableRed Hat
cpe:2.3:a:redhat:storage:2.0:*:*:*:*:*:*:*2.0VulnerableRed Hat
cpe:2.3:a:redhat:storage_for_public_cloud:2.0:*:*:*:*:*:*:*2.0VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*6.0VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_eus:5.6:*:*:*:*:*:*:*5.6VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_eus:6.1:*:*:*:*:*:*:*6.1VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_eus:6.2:*:*:*:*:*:*:*6.2VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_server:5.0:*:*:*:*:*:*:*5.0VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*6.0VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_server_aus:5.3:*:*:*:*:*:*:*5.3VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_server_aus:5.6:*:*:*:*:*:*:*5.6VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_workstation:5.0:*:*:*:*:*:*:*5.0VulnerableRed Hat
cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*6.0VulnerableRed Hat
  • cpe:2.3:o:suse:linux_enterprise_server:11:sp2:*:*:*:vmware:*:* Versions 11 sp2 Vulnerable ·SUSE
  • cpe:2.3:o:suse:linux_enterprise_software_development_kit:10:sp4:*:*:*:*:*:* Versions 10 sp4 Vulnerable ·SUSE
  • cpe:2.3:o:suse:linux_enterprise_software_development_kit:11:sp2:*:*:*:*:*:* Versions 11 sp2 Vulnerable ·SUSE
  • cpe:2.3:o:apple:mac_os_x:*:*:*:*:*:*:*:* Versions 10.6.8 to before 10.7.5; 10.8.0 to before 10.8.2 Vulnerable ·Apple
  • cpe:2.3:a:redhat:application_stack:2.0:*:*:*:*:*:*:* Versions 2.0 Vulnerable ·Red Hat
  • cpe:2.3:a:redhat:gluster_storage_server_for_on-premise:2.0:*:*:*:*:*:*:* Versions 2.0 Vulnerable ·Red Hat
  • cpe:2.3:a:redhat:storage:2.0:*:*:*:*:*:*:* Versions 2.0 Vulnerable ·Red Hat
  • cpe:2.3:a:redhat:storage_for_public_cloud:2.0:*:*:*:*:*:*:* Versions 2.0 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_eus:5.6:*:*:*:*:*:*:* Versions 5.6 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_eus:6.1:*:*:*:*:*:*:* Versions 6.1 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_eus:6.2:*:*:*:*:*:*:* Versions 6.2 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_server:5.0:*:*:*:*:*:*:* Versions 5.0 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_server_aus:5.3:*:*:*:*:*:*:* Versions 5.3 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_server_aus:5.6:*:*:*:*:*:*:* Versions 5.6 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_workstation:5.0:*:*:*:*:*:*:* Versions 5.0 Vulnerable ·Red Hat
  • cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:* Versions 6.0 Vulnerable ·Red Hat

Remediation

Red Hat 5 advisories

  • RHSA-2012:0570 Released 2012-05-11 · Red Hat rating Critical
    php security update
    • Red Hat Application Stack v2 for Enterprise Linux (v.5) php-5.2.10-2.el5s2, php-5.2.10-2.el5s2.i386, php-bcmath-5.2.10-2.el5s2 +35
  • RHSA-2012:0568 Released 2012-05-10 · Red Hat rating Critical
    php security update
    • Red Hat Enterprise Linux EUS (v. 5.6 server) php-5.1.6-27.el5_6.4, php-5.1.6-27.el5_6.4.i386, php-5.1.6-27.el5_6.4.ia64 +47
    • Red Hat Enterprise Linux Long Life (v. 5.3 server) php-5.1.6-23.3.el5_3, php-5.1.6-23.3.el5_3.i386, php-5.1.6-23.3.el5_3.ia64 +47
    • Red Hat Enterprise Linux Server EUS (v. 6.0) php-5.3.2-6.el6_0.2, php-cli-5.3.2-6.el6_0.2, php-common-5.3.2-6.el6_0.2 +9
    • Red Hat Enterprise Linux Server EUS (v. 6.1) php-5.3.3-3.el6_1.4, php-cli-5.3.3-3.el6_1.4, php-common-5.3.3-3.el6_1.4 +9
    • Red Hat Enterprise Linux Server Optional EUS (v. 6.0) php-5.3.2-6.el6_0.2, php-bcmath-5.3.2-6.el6_0.2, php-dba-5.3.2-6.el6_0.2 +12
    • Red Hat Enterprise Linux Server Optional EUS (v. 6.1) php-5.3.3-3.el6_1.4, php-bcmath-5.3.3-3.el6_1.4, php-dba-5.3.3-3.el6_1.4 +12
  • RHSA-2012:0569 Released 2012-05-10 · Red Hat rating Critical
    php53 security update
    • Red Hat Enterprise Linux EUS (v. 5.6 server) php53-5.3.3-1.el5_6.2, php53-5.3.3-1.el5_6.2.i386, php53-5.3.3-1.el5_6.2.ia64 +47
Show 2 more Red Hat advisories
  • RHSA-2012:0546 Released 2012-05-07 · Red Hat rating Critical
    php security update
    • RHEL Desktop Workstation (v. 5 client) php-5.1.6-34.el5_8, php-5.1.6-34.el5_8.i386, php-bcmath-5.1.6-34.el5_8 +35
    • Red Hat Enterprise Linux (v. 5 server) php-5.1.6-34.el5_8, php-5.1.6-34.el5_8.i386, php-5.1.6-34.el5_8.ia64 +47
    • Red Hat Enterprise Linux Desktop Optional (v. 6) php-5.3.3-3.el6_2.8, php-bcmath-5.3.3-3.el6_2.8, php-cli-5.3.3-3.el6_2.8 +23
    • Red Hat Enterprise Linux HPC Node (v. 6) php-5.3.3-3.el6_2.8, php-cli-5.3.3-3.el6_2.8, php-common-5.3.3-3.el6_2.8
    • Red Hat Enterprise Linux HPC Node Optional (v. 6) php-5.3.3-3.el6_2.8, php-bcmath-5.3.3-3.el6_2.8, php-dba-5.3.3-3.el6_2.8 +21
    • Red Hat Enterprise Linux Server (v. 6) php-5.3.3-3.el6_2.8, php-cli-5.3.3-3.el6_2.8, php-common-5.3.3-3.el6_2.8 +9
    • Red Hat Enterprise Linux Server Optional (v. 6) php-5.3.3-3.el6_2.8, php-bcmath-5.3.3-3.el6_2.8, php-dba-5.3.3-3.el6_2.8 +12
    • Red Hat Enterprise Linux Workstation (v. 6) php-5.3.3-3.el6_2.8, php-cli-5.3.3-3.el6_2.8, php-common-5.3.3-3.el6_2.8 +9
    • Red Hat Enterprise Linux Workstation Optional (v. 6) php-5.3.3-3.el6_2.8, php-bcmath-5.3.3-3.el6_2.8, php-dba-5.3.3-3.el6_2.8 +12
  • RHSA-2012:0547 Released 2012-05-07 · Red Hat rating Critical
    php53 security update
    • RHEL Desktop Workstation (v. 5 client) php53-5.3.3-7.el5_8, php53-5.3.3-7.el5_8.i386, php53-bcmath-5.3.3-7.el5_8 +39
    • Red Hat Enterprise Linux (v. 5 server) php53-5.3.3-7.el5_8, php53-5.3.3-7.el5_8.i386, php53-5.3.3-7.el5_8.ia64 +47

Vendor assessments

Red Hat

Red Hat rating: Critical. Red Hat's page for this CVE →

ProductStatusPlan or fix
RHEL Desktop Workstation (v. 5 client)Fixed RHSA-2012:0546, RHSA-2012:0547
Red Hat Enterprise Linux (v. 5 server)Fixed RHSA-2012:0546, RHSA-2012:0547
Red Hat Enterprise Linux Desktop Optional (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux EUS (v. 5.6 server)Fixed RHSA-2012:0568, RHSA-2012:0569
Red Hat Enterprise Linux HPC Node (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux HPC Node Optional (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux Long Life (v. 5.3 server)Fixed RHSA-2012:0568
Red Hat Enterprise Linux Server (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux Server EUS (v. 6.0)Fixed RHSA-2012:0568
Red Hat Enterprise Linux Server EUS (v. 6.1)Fixed RHSA-2012:0568
Red Hat Enterprise Linux Server Optional (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux Server Optional EUS (v. 6.0)Fixed RHSA-2012:0568
Red Hat Enterprise Linux Server Optional EUS (v. 6.1)Fixed RHSA-2012:0568
Red Hat Enterprise Linux Workstation (v. 6)Fixed RHSA-2012:0546
Red Hat Enterprise Linux Workstation Optional (v. 6)Fixed RHSA-2012:0546
Not affected: 1 product
  • Red Hat Enterprise Linux 4

Timeline

  1. 2022-03-25 Added to CISA KEV
  2. 2026-10-02 Threatist record created from CVE-2012-1823
  3. 2026-10-03 Alias added: GHSA-3p37-hv77-x3rp

References

  • TI-2024-04260 Argument Injection in PHP-CGI KEVCVSS 3.1CRITICAL 9.8
  • TI-2019-08259 Underflow in PHP-FPM can lead to RCE KEVCVSS 3.1CRITICAL 9.8
  • TI-2026-78794 PHP remote code execution via stale global state KEVCVSS 4.0CRITICAL 9.2
  • TI-2026-78793 Out-of-memory handling flaw in PHP allows remote code execution KEVCVSS 4.0CRITICAL 9.2
  • TI-2015-00205 Heap-based buffer overflow in the __nss_hostname_digits_dots function in glibc 2.2, and… CVSS 2.0HIGH 10.0
  • TI-2018-05487 In PHP through 5.6.33, 7.0.x before 7.0.28, 7.1.x through 7.1.14, and 7.2.x through… CVSS 3.0CRITICAL 9.8
See all 739 →

Sources