Skip to content
WatchlistHigh

CVE-2012-2386PHP Heap Buffer Overflow

php: Integer overflow leading to heap-buffer overflow in the Phar extension

Published May 21, 2012 · Updated Mar 9, 2026 · Also known as DEBIAN-CVE-2012-2386, DSA-2492-1

Key Facts

Patch immediately
  • CVE-2012-2386 is a high-severity vulnerability (CVSS 7.5 v2) affecting PHP, php5 (debian), php-bcmath (amazon) and 22 more products.
  • It is not listed in any known-exploited vulnerabilities catalog. Public exploit code is available.
  • EPSS estimates a 42% probability of exploitation in the next 30 days.
  • Fixed versions are available, including PHP 0:5.3.3-14.el6_3, PHP 5.3.14-2.21.amzn1, PHP 5.3.3-14.el6_3.
  • Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.

Scores

CVSS v2

7.5

AV:N/AC:L/Au:N/C:P/I:P/A:P

EPSS (30-day exploit likelihood)

42%

Higher than 98.6% of all scored CVEs

Exploit maturity

Proof of concept

ATLAS score

44/100

Publication score, see How it works

Exploitation Verdict

KEV listed

Not listed

Federal due date

None

No federal due date

Ransomware use

Not reported

Attributed actors

None named

Exploit & Defence Guidance

Exploit maturity

Proof of concept

Public exploit code

1

Proof-of-concept links

In-the-wild evidence

1

Reports of active use

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.

Affected Products

79 affected entries in total
ProductAffected versionsFixed in
PHPPHPSee advisory5.3.13
php5debianSee advisory5.3.3-7+squeeze13
php-bcmathamazonSee advisory5.3.14-2.21.amzn1
php-cliamazonSee advisory5.3.14-2.21.amzn1
php-commonamazonSee advisory5.3.14-2.21.amzn1
20 more affected products in the full CVE brief

Patched Releases

PHP

0:5.3.3-14.el6_3, 5.3.14-2.21.amzn1, 5.3.3-14.el6_3, 5.3.13

php-bcmath

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-cli

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-common

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-dba

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-devel

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-embedded

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-enchant

5.3.3-14.el6_3

php-fpm

5.3.14-2.21.amzn1

php-gd

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-imap

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-intl

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-ldap

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-mbstring

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-mcrypt

5.3.14-2.21.amzn1

php-mssql

5.3.14-2.21.amzn1

php-mysql

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-mysqlnd

5.3.14-2.21.amzn1

php-odbc

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-pdo

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-pgsql

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-process

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-pspell

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-recode

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

php-snmp

5.3.14-2.21.amzn1, 5.3.3-14.el6_3

Timeline

  1. Publicly disclosed

    May 21, 2012

  2. Last updated

    Mar 9, 2026

Weakness Type

  • CWE-122 Heap-based Buffer Overflow
  • CWE-189
  • CWE-190 Integer Overflow or Wraparound

References

7 more references in the full CVE brief

FAQ

Common Questions.

Is CVE-2012-2386 On Your Attack Surface?

Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.

Request A Demo

Figures as of Oct 19, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.