CVE-2011-4885

MEDIUM5.0/ 10.0
Share:
Published: December 30, 2011 at 01:55 AM
Modified: April 11, 2025 at 12:51 AM
Source: cve@mitre.org

Vulnerability Description

PHP before 5.3.9 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.

CVSS Metrics

Base Score
5.0
Severity
MEDIUM
Vector String
AV:N/AC:L/Au:N/C:N/I:N/A:P

Weaknesses (CWE)

Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

PHP versions prior to 5.3.9 are vulnerable to a denial-of-service (DoS) attack. Attackers can exploit a flaw in how PHP handles hash collisions in form parameters, leading to excessive CPU consumption and potentially rendering web applications unresponsive.

02 // Vulnerability Mechanism

Step 1: Payload Preparation: The attacker crafts a malicious HTTP request containing a large number of form parameters. These parameters are designed to collide within PHP's hash function.

Step 2: Request Submission: The attacker sends the crafted HTTP request to a vulnerable PHP application.

Step 3: Parameter Processing: The PHP interpreter receives the request and begins processing the form parameters. Due to the hash collisions, the interpreter spends a significant amount of time comparing the parameters.

Step 4: Resource Exhaustion: The CPU usage of the PHP process spikes as it attempts to resolve the hash collisions. This leads to a denial-of-service condition, as the server becomes unresponsive to legitimate requests.

03 // Deep Technical Analysis

The vulnerability stems from a weakness in PHP's hash function used for processing form parameters. Specifically, the hash function used for the $_POST, $_GET, and $_REQUEST superglobals is susceptible to hash collisions. Attackers can craft a large number of form parameters that all hash to the same value. When PHP processes these parameters, it must compare each parameter against all others that hash to the same value, leading to O(n^2) complexity in the worst-case scenario. This causes a significant increase in CPU usage, effectively creating a DoS condition. The root cause is the lack of a robust collision resolution strategy and the predictable nature of the hash function, allowing attackers to pre-calculate collisions.

References & Intelligence

http://archives.neohapsis.com/archives/bugtraq/2011-12/0181.html
Source: cve@mitre.org
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
Source: cve@mitre.org
http://lists.apple.com/archives/security-announce/2012/May/msg00001.html
Source: cve@mitre.org
http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00013.html
Source: cve@mitre.org
http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00016.html
Source: cve@mitre.org
http://marc.info/?l=bugtraq&m=132871655717248&w=2
Source: cve@mitre.org
http://marc.info/?l=bugtraq&m=133469208622507&w=2
Source: cve@mitre.org
http://rhn.redhat.com/errata/RHSA-2012-0071.html
Source: cve@mitre.org
http://secunia.com/advisories/47404
Source: cve@mitre.org
http://secunia.com/advisories/48668
Source: cve@mitre.org
http://support.apple.com/kb/HT5281
Source: cve@mitre.org
http://svn.php.net/viewvc?view=revision&revision=321003
Source: cve@mitre.org
http://svn.php.net/viewvc?view=revision&revision=321040
Source: cve@mitre.org
http://www.debian.org/security/2012/dsa-2399
Source: cve@mitre.org
http://www.exploit-db.com/exploits/18296
Source: cve@mitre.org
http://www.exploit-db.com/exploits/18305
Source: cve@mitre.org
http://www.kb.cert.org/vuls/id/903934
Source: cve@mitre.org
US Government Resource
http://www.mandriva.com/security/advisories?name=MDVSA-2011:197
Source: cve@mitre.org
http://www.mandriva.com/security/advisories?name=MDVSA-2013:150
Source: cve@mitre.org
http://www.nruns.com/_downloads/advisory28122011.pdf
Source: cve@mitre.org
http://www.ocert.org/advisories/ocert-2011-003.html
Source: cve@mitre.org
http://www.oracle.com/technetwork/topics/security/cpujul2012-392727.html
Source: cve@mitre.org
http://www.redhat.com/support/errata/RHSA-2012-0019.html
Source: cve@mitre.org
http://www.securityfocus.com/bid/51193
Source: cve@mitre.org
http://www.securitytracker.com/id?1026473
Source: cve@mitre.org
https://exchange.xforce.ibmcloud.com/vulnerabilities/72021
Source: cve@mitre.org
https://github.com/FireFart/HashCollision-DOS-POC/blob/master/HashtablePOC.py
Source: cve@mitre.org
http://archives.neohapsis.com/archives/bugtraq/2011-12/0181.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
Source: af854a3a-2127-422b-91ae-364da2661108
http://lists.apple.com/archives/security-announce/2012/May/msg00001.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00013.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00016.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://marc.info/?l=bugtraq&m=132871655717248&w=2
Source: af854a3a-2127-422b-91ae-364da2661108
http://marc.info/?l=bugtraq&m=133469208622507&w=2
Source: af854a3a-2127-422b-91ae-364da2661108
http://rhn.redhat.com/errata/RHSA-2012-0071.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://secunia.com/advisories/47404
Source: af854a3a-2127-422b-91ae-364da2661108
http://secunia.com/advisories/48668
Source: af854a3a-2127-422b-91ae-364da2661108
http://support.apple.com/kb/HT5281
Source: af854a3a-2127-422b-91ae-364da2661108
http://svn.php.net/viewvc?view=revision&revision=321003
Source: af854a3a-2127-422b-91ae-364da2661108
http://svn.php.net/viewvc?view=revision&revision=321040
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.debian.org/security/2012/dsa-2399
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.exploit-db.com/exploits/18296
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.exploit-db.com/exploits/18305
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.kb.cert.org/vuls/id/903934
Source: af854a3a-2127-422b-91ae-364da2661108
US Government Resource
http://www.mandriva.com/security/advisories?name=MDVSA-2011:197
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.mandriva.com/security/advisories?name=MDVSA-2013:150
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.nruns.com/_downloads/advisory28122011.pdf
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.ocert.org/advisories/ocert-2011-003.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.oracle.com/technetwork/topics/security/cpujul2012-392727.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.redhat.com/support/errata/RHSA-2012-0019.html
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.securityfocus.com/bid/51193
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.securitytracker.com/id?1026473
Source: af854a3a-2127-422b-91ae-364da2661108
https://exchange.xforce.ibmcloud.com/vulnerabilities/72021
Source: af854a3a-2127-422b-91ae-364da2661108
https://github.com/FireFart/HashCollision-DOS-POC/blob/master/HashtablePOC.py
Source: af854a3a-2127-422b-91ae-364da2661108
CVE-2011-4885 - MEDIUM Severity (5) | Free CVE Database | 4nuxd