All reports
Medium

php: memory corruption in phar_parse_tarfile caused by empty entry file name

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2015-4021

Probability of exploitation in the next 30 days: 20.48%

FIRST EPSS · 2026-11-23

Description

The phar_parse_tarfile function in ext/phar/tar.c in PHP before 5.4.41, 5.5.x before 5.5.25, and 5.6.x before 5.6.9 does not verify that the first character of a filename is different from the \0 character, which allows remote attackers to cause a denial of service (integer underflow and memory corruption) via a crafted entry in a tar archive.

An integer underflow flaw leading to out-of-bounds memory access was found in the way PHP's Phar extension parsed Phar archives. A specially crafted archive could cause PHP to crash or, possibly, execute arbitrary code when opened.