Back to CVE records
Critical 9.8Known exploited (CISA KEV)Published May 11, 2012

CVE-2012-1823sapi/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 al…

Updated under an hour ago ()

Does this affect you?

It affects php and 16 other products. Add what you run to find out whether that includes you.

CISA lists it as known exploited since Mar 25, 2022; federal agencies had to remediate by Apr 15, 2022. Treat that date as your deadline.

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
9.8 CRITICAL (v3.1, CISA ADP)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-77
Known exploited
Added to CISA KEV Mar 25, 2022; federal remediation due Apr 15, 2022Apply updates per vendor instructions.
EPSS (exploitation in the next 30 days)
100.00% (percentile 100)
Assigned by
certcc
NVD analysis
Analyzed
Record last updated
Nov 4, 2025
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
php php
php:php
before 5.3.12; from 5.4.0 before 5.4.2
NVD
fedoraproject fedora
fedoraproject:fedora
39; 40
NVD
debian debian_linux
debian:debian_linux
6.0
NVD
hp hp-ux
hp:hp-ux
b.11.23; b.11.31
NVD
opensuse opensuse
opensuse:opensuse
11.4; 12.1
NVD
suse linux_enterprise_server
suse:linux_enterprise_server
10; 11; 11
NVD
suse linux_enterprise_software_development_kit
suse:linux_enterprise_software_development_kit
10; 11
NVD
apple mac_os_x
apple:mac_os_x
from 10.6.8 before 10.7.5; from 10.8.0 before 10.8.2
NVD
redhat application_stack
redhat:application_stack
2.0
NVD
redhat gluster_storage_server_for_on-premise
redhat:gluster_storage_server_for_on-premise
2.0
NVD
redhat storage
redhat:storage
2.0
NVD
redhat storage_for_public_cloud
redhat:storage_for_public_cloud
2.0
NVD
redhat enterprise_linux_desktop
redhat:enterprise_linux_desktop
6.0
NVD
redhat enterprise_linux_eus
redhat:enterprise_linux_eus
5.6; 6.1; 6.2
NVD
redhat enterprise_linux_server
redhat:enterprise_linux_server
5.0; 6.0
NVD
redhat enterprise_linux_server_aus
redhat:enterprise_linux_server_aus
5.3; 5.6
NVD
redhat enterprise_linux_workstation
redhat:enterprise_linux_workstation
5.0; 6.0
NVD

References

  • vendor-advisory, mailing-list
  • vendor-advisory, mailing-list, third-party-advisory
  • vdb-entry, broken-link, third-party-advisory
  • vendor-advisory, broken-link
  • vendor-advisory, broken-link
  • vendor-advisory, mailing-list, third-party-advisory
  • vendor-advisory, third-party-advisory
  • vendor-advisory, third-party-advisory
  • vendor-advisory, third-party-advisory
  • exploit, patch, release-notes
  • third-party-advisory, broken-link
  • vendor-advisory, third-party-advisory
  • vendor-advisory, mailing-list, third-party-advisory
  • third-party-advisory, us-government-resource
  • vendor-advisory, third-party-advisory
  • vendor-advisory, mailing-list, third-party-advisory
  • third-party-advisory
  • broken-link, exploit
  • third-party-advisory, broken-link
  • third-party-advisory, exploit, us-government-resource
  • vendor-advisory, third-party-advisory
  • third-party-advisory, broken-link
  • release-notes
  • broken-link
  • mailing-list

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.