CVE-2012-1823: Vulnerability in PHP

Actively exploited. 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.

Exploited in the wild, CWE-77

Exploitation
Confirmed 25 Mar 2022
Severity
9.8 of 10
Attack likelihood
100 % in 30 days
Fix
Fixed version known
Patch deadline
Agencies by 15 Apr 2022

Details

EU ID
EUVD-2012-1833
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-77
Published
11 May 2012
Last change
16 Jun 2026
Likelihood rank
Higher than 100 % of all rated vulnerabilities
Analysis status
Analyzed
Required action
Apply updates per vendor instructions.

Affected products

Affected versions and the first fixed release

  • PHP Before 5.3.12; From 5.4.0 before 5.4.2. Fixed in 5.3.12, 5.4.2
  • Fedoraproject Fedora Versions 39, 40. No fixed version recorded
  • Debian Linux Version 6.0. No fixed version recorded
  • Hp-ux Versions b.11.23, b.11.31. No fixed version recorded
  • Opensuse Versions 11.4, 12.1. No fixed version recorded
  • SUSE Linux Enterprise Server Versions 10, 11. No fixed version recorded
  • SUSE Linux Enterprise Software Development Kit Versions 10, 11. No fixed version recorded
  • Apple macOS From 10.6.8 before 10.7.5; From 10.8.0 before 10.8.2. Fixed in 10.7.5, 10.8.2

Advisories

Vendor and security advisories

Patches and fixes

Updates, commits and release notes

Exploit code

Public exploits and proofs of concept, handle with care

Related