---
title: "CVE-2012-1823\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2012-1823?format=md
keywords: index, follow
---

# CVE-2012-1823

Publication date 3 May 2012

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**9.8 · Critical**

[Score breakdown](https://ubuntu.com/security/CVE-2012-1823?format=md#impact-score)

Toggle side navigation

## Description

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.

### From the Ubuntu Security Team

It was discovered that PHP, when used as a stand alone CGI processor
for the Apache Web Server, did not properly parse and filter query
strings. This could allow a remote attacker to execute arbitrary code
running with the privilege of the web server. Configurations using
mod\_php5 and FastCGI were not vulnerable.

[Read the notes from the security team](https://ubuntu.com/security/CVE-2012-1823?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| php5 | 12.04 LTS precise | Fixed 5.3.10-1ubuntu3.1 |
| 11.10 oneiric | Fixed 5.3.6-13ubuntu3.7 |
| 11.04 natty | Fixed 5.3.5-1ubuntu7.8 |
| 10.04 LTS lucid | Fixed 5.3.2-1ubuntu4.15 |
| 8.04 LTS hardy | Fixed 5.2.4-2ubuntu5.24 |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)

## Notes

---

### [mdeslaur](https://launchpad.net/~mdeslaur)

Fix was incomplete, see CVE-2012-2311

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

9.8 · Critical

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 9.8 · Critical |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1823)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2012-1823)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2012-1823)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2012-1823)

### Related Ubuntu Security Notices (USN)

+ [USN-1437-1](https://usn.ubuntu.com/USN-1437-1)
+ PHP vulnerability
+ 4 May 2012

### Other references

* <http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/>
* <https://www.cve.org/CVERecord?id=CVE-2012-1823>
* <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>
