CVE-2015-7804 in PHPinfo

Prediction

by VulDB Data Team • 05/12/2025

A security vulnerability has been detected in PHP up to 5.5.29/5.6.13. Affected is the function phar_parse_zipfile of the file ext/phar/zip.c of the component PHAR Archive Handler. Such manipulation leads to off-by-one. The attack may be performed from remote. Upgrading to version 5.5.30 and 5.6.14 is able to address this issue. The affected component should be upgraded.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 05/12/2025

The vulnerability identified as CVE-2015-7804 represents a critical off-by-one error within PHP's phar extension that affects versions prior to 5.5.30 and 5.6.14. This flaw exists in the phar_parse_zipfile function located in ext/phar/zip.c, where improper boundary checking leads to memory corruption issues. The vulnerability specifically manifests when a maliciously crafted .zip PHAR archive contains a filename consisting solely of the forward slash character, which creates an uninitialized pointer dereference condition that can be exploited remotely.

The technical implementation of this vulnerability stems from insufficient input validation within the ZIP file parsing logic. When PHP processes a PHAR archive containing a filename with only a forward slash character, the phar_parse_zipfile function fails to properly handle the edge case where the filename length equals the buffer size minus one. This off-by-one condition results in the function attempting to access memory beyond the allocated buffer boundaries, leading to undefined behavior and application instability. The flaw operates at the core of PHP's archive handling mechanism, making it particularly dangerous as it can be triggered through normal file processing operations.

The operational impact of CVE-2015-7804 extends beyond simple denial of service to potentially enable more sophisticated attacks. Remote attackers can leverage this vulnerability to cause application crashes and system instability, effectively creating a denial of service condition that disrupts legitimate service operations. In environments where PHP applications process untrusted file uploads or handle external archive data, this vulnerability can be exploited to systematically crash web applications, leading to service interruptions that may affect availability and user experience. The vulnerability aligns with CWE-129, which describes improper validation of array index values, and demonstrates the dangerous consequences of inadequate boundary checking in memory management operations.

Organizations affected by this vulnerability should prioritize immediate patching of all PHP installations running versions prior to the fixed releases. The remediation process involves upgrading to PHP 5.5.30 or 5.6.14, depending on the current version in use, which contain the necessary code modifications to properly handle the edge case. Additionally, administrators should implement input validation measures to prevent processing of suspicious PHAR archives and consider deploying web application firewalls that can detect and block malicious archive file patterns. The vulnerability demonstrates the importance of proper memory boundary checking and aligns with ATT&CK technique T1499.004, which covers network denial of service attacks through application-level vulnerabilities, emphasizing the need for comprehensive security testing of archive handling components in web applications.

Moderation

accepted

Entry

2

Relate

show

CPE

ready

EPSS

0.18271

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!