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

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
php
CWE-119
nessus
exploit available
metasploit

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
Php
3

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

descriptionPHP apache_request_headers Function Buffer Overflow. CVE-2012-2329. Remote exploit for windows platform
idEDB-ID:19231
last seen2016-02-02
modified2012-06-17
published2012-06-17
reportermetasploit
sourcehttps://www.exploit-db.com/download/19231/
titlePHP apache_request_headers Function Buffer Overflow

Metasploit

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2012-7628.NASL
    descriptionThe 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 seen2020-03-17
    modified2012-05-29
    plugin id59268
    published2012-05-29
    reporterThis script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/59268
    titleFedora 17 : maniadrive-1.2-40.fc17 / php-5.4.3-1.fc17 (2012-7628)
  • NASL familyWeb Servers
    NASL idHPSMH_7_2_1_0.NASL
    descriptionAccording to the web server
    last seen2020-06-01
    modified2020-06-02
    plugin id69020
    published2013-07-23
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/69020
    titleHP System Management Homepage < 7.2.1.0 Multiple Vulnerabilities (BEAST)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_59B68B1E9C7811E1B5E0000C299B62E1.NASL
    descriptionThe 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 seen2020-06-01
    modified2020-06-02
    plugin id59084
    published2012-05-14
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/59084
    titleFreeBSD : php -- multiple vulnerabilities (59b68b1e-9c78-11e1-b5e0-000c299b62e1)
  • NASL familyCGI abuses
    NASL idPHP_5_4_3.NASL
    descriptionAccording 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 seen2020-06-01
    modified2020-06-02
    plugin id59057
    published2012-05-09
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/59057
    titlePHP 5.4.x < 5.4.3 Multiple Vulnerabilities

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/113815/php_apache_request_headers_bof.rb.txt
idPACKETSTORM:113815
last seen2016-12-05
published2012-06-17
reporterjuan vazquez
sourcehttps://packetstormsecurity.com/files/113815/PHP-apache_request_headers-Function-Buffer-Overflow.html
titlePHP apache_request_headers Function Buffer Overflow