ID CVE-2012-2329
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
  • PHP 5.4.0
  • PHP 5.4.1
  • PHP 5.4.2
Base: 5.0 (as of 11-05-2012 - 11:30)
  • 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.
  • Overflow Binary Resource File
    An attack of this type exploits a buffer overflow vulnerability in the handling of binary resources. Binary resources may include music files like MP3, image files like JPEG files, and any other binary file. These attacks may pass unnoticed to the client machine through normal usage of files, such as a browser loading a seemingly innocent JPEG file. This can allow the attacker access to the execution stack and execute arbitrary code in the target process. This attack pattern is a variant of standard buffer overflow attacks using an unexpected vector (binary files) to wrap its attack and open up a new attack vector. The attacker is required to either directly serve the binary content to the victim, or place it in a locale like a MP3 sharing application, for the victim to download. The attacker then is notified upon the download or otherwise locates the vulnerability opened up by the buffer overflow.
  • Buffer Overflow via Symbolic Links
    This type of attack leverages the use of symbolic links to cause buffer overflows. An attacker can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
  • Overflow Variables and Tags
    This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The attacker crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
  • Buffer Overflow via Parameter Expansion
    In this attack, the target software is given input that the attacker knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
  • Buffer Overflow in an API Call
    This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An attacker who has access to an API may try to embed malicious code in the API function call and exploit a buffer overflow vulnerability in the function's implementation. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
  • Buffer Overflow in Local Command-Line Utilities
    This attack targets command-line utilities available in a number of shells. An attacker can leverage a vulnerability found in a command-line utility to escalate privilege to root.
exploit-db via4
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
title PHP apache_request_headers Function Buffer Overflow
metasploit via4
  • 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.
    last seen 2018-09-05
    modified 2017-07-24
    published 2012-06-14
    reliability Manual
    reporter Rapid7
    title Avoid underscore/tolower
  • description This module exploits a stack based buffer overflow on Cogent DataHub 7.3.0. The vulnerability exists in the HTTP server. While handling HTTP headers, a strncpy() function is used in a dangerous way. This module has been tested successfully on Cogent DataHub 7.3.0 (Demo) on Windows XP SP3.
    last seen 2019-03-24
    modified 2018-07-09
    published 2013-08-16
    reliability Normal
    reporter Rapid7
    title Cogent DataHub HTTP Server Buffer Overflow
  • 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 "", running with Apache 2.2.22 from "".
    last seen 2019-03-11
    modified 2017-07-24
    published 2012-06-14
    reliability Normal
    reporter Rapid7
    title PHP apache_request_headers Function Buffer Overflow
nessus via4
  • 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 'mod_php' is not an exploitable configuration. (CVE-2012-2311, CVE-2012-2335, CVE-2012-2336) - An unspecified buffer overflow exists related to the function 'apache_request_headers'. (CVE-2012-2329)
    last seen 2019-02-21
    modified 2018-07-24
    plugin id 59057
    published 2012-05-09
    reporter Tenable
    title PHP 5.4.x < 5.4.3 Multiple Vulnerabilities
  • NASL family Web Servers
    NASL id HPSMH_7_2_1_0.NASL
    description According to the web server's banner, the version of HP System Management Homepage (SMH) hosted on the remote web server is a version prior to It is, therefore, affected by the following vulnerabilities : - An information disclosure vulnerability, known as BEAST, exists in the SSL 3.0 and TLS 1.0 protocols due to a flaw in the way the initialization vector (IV) is selected when operating in cipher-block chaining (CBC) modes. A man-in-the-middle attacker can exploit this to obtain plaintext HTTP header data, by using a blockwise chosen-boundary attack (BCBA) on an HTTPS session, in conjunction with JavaScript code that uses the HTML5 WebSocket API, the Java URLConnection API, or the Silverlight WebClient API. (CVE-2011-3389) - The utility 'apachectl' can receive a zero-length directory name in the LD_LIBRARY_PATH via the 'envvars' file. A local attacker with access to that utility could exploit this to load a malicious Dynamic Shared Object (DSO), leading to arbitrary code execution. (CVE-2012-0883) - Numerous, unspecified errors could allow remote denial of service attacks. (CVE-2012-2110, CVE-2012-2329, CVE-2012-2336, CVE-2013-2357, CVE-2013-2358, CVE-2013-2359, CVE-2013-2360) - 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 'mod_php' is not an exploitable configuration. (CVE-2012-2311, CVE-2012-2335) - Unspecified errors exist that could allow unauthorized access. (CVE-2012-5217, CVE-2013-2355) - Unspecified errors exist that could allow disclosure of sensitive information. (CVE-2013-2356, CVE-2013-2363) - An unspecified error exists that could allow cross-site scripting attacks. (CVE-2013-2361) - Unspecified errors exist that could allow a local attacker to cause denial of service conditions. (CVE-2013-2362, CVE-2013-2364) - An as-yet unspecified vulnerability exists that could cause a denial of service condition. (CVE-2013-4821)
    last seen 2019-02-21
    modified 2018-11-15
    plugin id 69020
    published 2013-07-23
    reporter Tenable
    title HP System Management Homepage < 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 2019-02-21
    modified 2018-11-10
    plugin id 59084
    published 2012-05-14
    reporter Tenable
    title FreeBSD : php -- multiple vulnerabilities (59b68b1e-9c78-11e1-b5e0-000c299b62e1)
packetstorm via4
data source
last seen 2016-12-05
published 2012-06-17
reporter juan vazquez
title PHP apache_request_headers Function Buffer Overflow
refmap via4
bid 53455
  • HPSBMU02900
  • SSRT100992
secunia 49014
xf php-apacherequestheaders-bo(75545)
Last major update 23-07-2013 - 05:39
Published 11-05-2012 - 06:15
Last modified 28-08-2017 - 21:31
Back to Top