CVE-2012-2329

PHP 5.4.x < 5.4.3 - Buffer Overflow via HTTP Request Header

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2012-2329. PoCs published by Metasploit, Vincent Danen, juan vazquez, including Metasploit module exploits/windows/http/php_apache_request_headers_bof.

AI-analyzed exploit summary This Metasploit module exploits a stack-based buffer overflow in PHP 5.4.x before 5.4.3 via the `apache_request_headers` function by sending a maliciously crafted HTTP header. It achieves remote code execution by overwriting the SEH handler and executing shellcode.

Description

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.

Exploits (2)

exploitdb WORKING POC VERIFIED
by Metasploit · rubyremotewindows
https://www.exploit-db.com/exploits/19231

This Metasploit module exploits a stack-based buffer overflow in PHP 5.4.x before 5.4.3 via the `apache_request_headers` function by sending a maliciously crafted HTTP header. It achieves remote code execution by overwriting the SEH handler and executing shellcode.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHP 5.4.x before 5.4.3 (CGI version)
No auth needed
Prerequisites: PHP 5.4.x before 5.4.3 running as CGI · Apache web server
devstral-2 · analyzed Feb 16, 2026 Full analysis →
metasploit WORKING POC NORMAL
by Vincent Danen, juan vazquez · rubypocwin
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/http/php_apache_request_headers_bof.rb

This Metasploit module exploits a stack-based buffer overflow in PHP 5.4.x before 5.4.3 via insecure handling of HTTP headers in the CGI version. It targets Windows systems with a crafted HTTP request containing a malicious payload to achieve remote code execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHP 5.4.x before 5.4.3 (CGI version)
No auth needed
Prerequisites: Target running PHP 5.4.x before 5.4.3 in CGI mode · Apache or similar web server · Network access to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (8)

Core 8
Core References
Various Sources x_refsource_confirm
https://bugs.php.net/bug.php?id=61807
Third Party Advisory, VDB Entry vdb-entry x_refsource_xf
https://exchange.xforce.ibmcloud.com/vulnerabilities/75545
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/49014
Vendor Advisory x_refsource_confirm
http://www.php.net/archive/2012.php#id2012-05-08-1
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/53455
Vendor Advisory x_refsource_confirm
http://www.php.net/ChangeLog-5.php#5.4.3

Scores

EPSS 0.6265
EPSS Percentile 99.1%

Details

CWE
CWE-119
Status published
Products (3)
php/php 5.4.0
php/php 5.4.1
php/php 5.4.2
Published May 11, 2012
Tracked Since Feb 18, 2026