CVE-2012-2386

PHP <5.3.14, <5.4.4 - Buffer Overflow

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2012-2386. PoCs published by Alexander Gavrun.

AI-analyzed exploit summary This exploit leverages an integer overflow vulnerability in PHP's phar extension (CVE-2012-2386), leading to a heap overflow. The PoC demonstrates how a maliciously crafted tar file can trigger the vulnerability by manipulating the uncompressed file size field.

Description

Integer overflow in the phar_parse_tarfile function in tar.c in the phar extension in PHP before 5.3.14 and 5.4.x before 5.4.4 allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code via a crafted tar file that triggers a heap-based buffer overflow.

Exploits (1)

exploitdb WORKING POC
by Alexander Gavrun · phpdosmultiple
https://www.exploit-db.com/exploits/17201

This exploit leverages an integer overflow vulnerability in PHP's phar extension (CVE-2012-2386), leading to a heap overflow. The PoC demonstrates how a maliciously crafted tar file can trigger the vulnerability by manipulating the uncompressed file size field.

Classification
Working Poc 90%
Attack Type
Dos
Complexity
Moderate
Reliability
Reliable
Target: PHP 5.3.6 with phar extension 1.1.1
No auth needed
Prerequisites: PHP with phar extension enabled · Ability to upload or serve a malicious tar file
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (9)

Core 9
Core References
Issue Tracking, Third Party Advisory x_refsource_confirm
https://bugzilla.redhat.com/show_bug.cgi?id=823594
Mailing List, Third Party Advisory vendor-advisory x_refsource_suse
http://lists.opensuse.org/opensuse-security-announce/2012-07/msg00003.html
Vendor Advisory x_refsource_confirm
https://bugs.php.net/bug.php?id=61065
Vendor Advisory x_refsource_confirm
http://www.php.net/ChangeLog-5.php
Mailing List, Third Party Advisory vendor-advisory x_refsource_apple
http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
Third Party Advisory x_refsource_confirm
http://support.apple.com/kb/HT5501
Mailing List, Third Party Advisory mailing-list x_refsource_mlist
http://openwall.com/lists/oss-security/2012/05/22/10
Exploit, Third Party Advisory x_refsource_misc
http://0x1byte.blogspot.com/2011/04/php-phar-extension-heap-overflow.html

Scores

EPSS 0.4248
EPSS Percentile 98.5%

Details

CWE
CWE-189
Status published
Products (1)
php/php < 5.3.13
Published Jul 07, 2012
Tracked Since Feb 18, 2026