Vulnerabilities > CVE-2012-2329 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in PHP 5.4.0/5.4.1/5.4.2
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
Buffer overflow in the apache_request_headers function in sapi/cgi/cgi_main.c in PHP 5.4.x before 5.4.3 allows remote attackers to cause a denial of service (application crash) via a long string in the header of an HTTP request.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 3 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Buffer Overflow via Environment Variables This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
- Overflow Buffers Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
- Client-side Injection-induced Buffer Overflow This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
- Filter Failure through Buffer Overflow In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
- MIME Conversion An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
Exploit-Db
description | PHP apache_request_headers Function Buffer Overflow. CVE-2012-2329. Remote exploit for windows platform |
id | EDB-ID:19231 |
last seen | 2016-02-02 |
modified | 2012-06-17 |
published | 2012-06-17 |
reporter | metasploit |
source | https://www.exploit-db.com/download/19231/ |
title | PHP apache_request_headers Function Buffer Overflow |
Metasploit
description Underscore/tolower Safe Encoder used to exploit CVE-2012-2329. It is a modified version of the 'Avoid UTF8/tolower' encoder by skape. Please check the documentation of the skape encoder before using it. As the original, this encoder expects ECX pointing to the start of the encoded payload. Also BufferOffset must be provided if needed. The changes introduced are (1) avoid the use of the 0x5f byte (underscore) in because it is a badchar in the CVE-2012-2329 case and (2) optimize the transformation block, having into account more relaxed conditions about bad characters greater than 0x80. id MSF:ENCODER/X86/AVOID_UNDERSCORE_TOLOWER last seen 2020-03-05 modified 2017-07-24 published 2012-06-14 reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/encoders/x86/avoid_underscore_tolower.rb title Avoid underscore/tolower description This module exploits a stack based buffer overflow in the CGI version of PHP 5.4.x before 5.4.3. The vulnerability is due to the insecure handling of the HTTP headers. This module has been tested against the thread safe version of PHP 5.4.2, from "windows.php.net", running with Apache 2.2.22 from "apachelounge.com". id MSF:EXPLOIT/WINDOWS/HTTP/PHP_APACHE_REQUEST_HEADERS_BOF last seen 2020-06-07 modified 2017-07-24 published 2012-06-14 references reporter Rapid7 source https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/windows/http/php_apache_request_headers_bof.rb title PHP apache_request_headers Function Buffer Overflow
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2012-7628.NASL description The releases complete a fix for a vulnerability in CGI-based setups (CVE-2012-2311). PHP 5.4.3 fixes a buffer overflow vulnerability in the apache_request_headers() (CVE-2012-2329). Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-05-29 plugin id 59268 published 2012-05-29 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59268 title Fedora 17 : maniadrive-1.2-40.fc17 / php-5.4.3-1.fc17 (2012-7628) NASL family Web Servers NASL id HPSMH_7_2_1_0.NASL description According to the web server last seen 2020-06-01 modified 2020-06-02 plugin id 69020 published 2013-07-23 reporter This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/69020 title HP System Management Homepage < 7.2.1.0 Multiple Vulnerabilities (BEAST) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_59B68B1E9C7811E1B5E0000C299B62E1.NASL description The PHP Development Team reports : The release of PHP 5.4.13 and 5.4.3 complete a fix for the vulnerability in CGI-based setups as originally described in CVE-2012-1823. (CVE-2012-2311) Note: mod_php and php-fpm are not vulnerable to this attack. PHP 5.4.3 fixes a buffer overflow vulnerability in the apache_request_headers() (CVE-2012-2329). last seen 2020-06-01 modified 2020-06-02 plugin id 59084 published 2012-05-14 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/59084 title FreeBSD : php -- multiple vulnerabilities (59b68b1e-9c78-11e1-b5e0-000c299b62e1) NASL family CGI abuses NASL id PHP_5_4_3.NASL description According to its banner, the version of PHP installed on the remote host is 5.4.x earlier than 5.4.3. It is, therefore, potentially affected the following vulnerabilities : - The fix for CVE-2012-1823 does not completely correct the CGI query parameter vulnerability. Disclosure of PHP source code and code execution are still possible. Note that this vulnerability is exploitable only when PHP is used in CGI-based configurations. Apache with last seen 2020-06-01 modified 2020-06-02 plugin id 59057 published 2012-05-09 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/59057 title PHP 5.4.x < 5.4.3 Multiple Vulnerabilities
Packetstorm
data source | https://packetstormsecurity.com/files/download/113815/php_apache_request_headers_bof.rb.txt |
id | PACKETSTORM:113815 |
last seen | 2016-12-05 |
published | 2012-06-17 |
reporter | juan vazquez |
source | https://packetstormsecurity.com/files/113815/PHP-apache_request_headers-Function-Buffer-Overflow.html |
title | PHP apache_request_headers Function Buffer Overflow |
References
- http://secunia.com/advisories/49014
- http://secunia.com/advisories/49014
- http://www.php.net/archive/2012.php#id2012-05-08-1
- http://www.php.net/archive/2012.php#id2012-05-08-1
- http://www.php.net/ChangeLog-5.php#5.4.3
- http://www.php.net/ChangeLog-5.php#5.4.3
- http://www.securityfocus.com/bid/53455
- http://www.securityfocus.com/bid/53455
- https://bugs.php.net/bug.php?id=61807
- https://bugs.php.net/bug.php?id=61807
- https://bugzilla.redhat.com/show_bug.cgi?id=820000
- https://bugzilla.redhat.com/show_bug.cgi?id=820000
- https://exchange.xforce.ibmcloud.com/vulnerabilities/75545
- https://exchange.xforce.ibmcloud.com/vulnerabilities/75545
- https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
- https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
- https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862
- https://h20564.www2.hp.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c03839862