PHP-CGI Query String Parameter Vulnerability
sapi/cgi/cgi_main.c in PHP, when configured as a CGI script, does not properly handle query strings, which allows remote attackers to execute arbitrary code.
Improper Neutralization of Special Elements used in a Command CWE-77
Text sent by an attacker ends up being run as a command.
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks.
Weakness data: MITRE Common Weakness Enumeration.
Improper Input Validation CWE-20
The software trusts data it is given without checking it, so an attacker can send something it was never built to handle.
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Weakness data: MITRE Common Weakness Enumeration.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 18 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| PHP PHP | Software | before 5.3.12; from 5.4.0, before 5.4.2 | 5.3.12; 5.4.2 |
| Redhat Enterprise Linux EUS | Operating system | 5.6; 6.1; 6.2 | not recorded |
| Suse Linux Enterprise Server | Operating system | 10 sp4; 11 sp2 | not recorded |
| Apple MAC OS X | Operating system | from 10.6.8, before 10.7.5; from 10.8.0, before 10.8.2 | 10.7.5; 10.8.2 |
| Fedoraproject Fedora | Operating system | 39; 40 | not recorded |
| HP Hp-ux | Operating system | b.11.23; b.11.31 | not recorded |
| Opensuse Opensuse | Operating system | 11.4; 12.1 | not recorded |
| Redhat Enterprise Linux Server | Operating system | 5.0; 6.0 | not recorded |
| Redhat Enterprise Linux Server AUS | Operating system | 5.3; 5.6 | not recorded |
| Redhat Enterprise Linux Workstation | Operating system | 5.0; 6.0 | not recorded |
| Suse Linux Enterprise Software Development KIT | Operating system | 10 sp4; 11 sp2 | not recorded |
| Debian Debian Linux | Operating system | 6.0 | not recorded |
| N/A N/A | Software | n/a | not recorded |
| Redhat Application Stack | Software | 2.0 | not recorded |
| Redhat Enterprise Linux Desktop | Operating system | 6.0 | not recorded |
and 3 more products. The complete list is on the NIST page.
The 9.8 severity score (critical) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 3.9 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
7 of the 31 sources NIST lists are patches or advisories from the vendor. 2 explain how the flaw works or include exploit code, so attackers can find instructions easily.