CVE-2016-5399

HIGH

PHP < 5.5.37 - Out-of-bounds Write via bzread Function

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2016-5399. PoCs published by Hans Jerry Illikainen.

AI-analyzed exploit summary This exploit targets a vulnerability in PHP's bzread() function (CVE-2016-5399), where inadequate error handling can lead to out-of-bound writes during BZip2 decompression. The PoC demonstrates remote code execution by uploading a malicious BZip2 archive to a vulnerable PHP application.

Description

The bzread function in ext/bz2/bz2.c in PHP before 5.5.38, 5.6.x before 5.6.24, and 7.x before 7.0.9 allows remote attackers to cause a denial of service (out-of-bounds write) or execute arbitrary code via a crafted bz2 archive.

Exploits (1)

exploitdb WORKING POC VERIFIED
by Hans Jerry Illikainen · pythondosphp
https://www.exploit-db.com/exploits/40155

This exploit targets a vulnerability in PHP's bzread() function (CVE-2016-5399), where inadequate error handling can lead to out-of-bound writes during BZip2 decompression. The PoC demonstrates remote code execution by uploading a malicious BZip2 archive to a vulnerable PHP application.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHP 7.0.8, 5.6.23, 5.5.37 with BZip2 extension
No auth needed
Prerequisites: Vulnerable PHP version with BZip2 extension enabled · Ability to upload files to the target server
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (15)

Core 15
Core References
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/92051
Exploit, Third Party Advisory, VDB Entry x_refsource_misc
http://packetstormsecurity.com/files/137998/PHP-7.0.8-5.6.23-5.5.37-bzread-OOB-Write.html
Exploit, Mailing List, Third Party Advisory mailing-list x_refsource_fulldisc
http://seclists.org/fulldisclosure/2016/Jul/72
Issue Tracking, Third Party Advisory, VDB Entry x_refsource_confirm
https://bugzilla.redhat.com/show_bug.cgi?id=1358395
Exploit, Mailing List, Third Party Advisory mailing-list x_refsource_mlist
http://www.openwall.com/lists/oss-security/2016/07/21/1
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/538966/100/0/threaded
Exploit, Vendor Advisory x_refsource_confirm
https://bugs.php.net/bug.php?id=72613
Third Party Advisory vendor-advisory x_refsource_redhat
http://rhn.redhat.com/errata/RHSA-2016-2750.html
Third Party Advisory vendor-advisory x_refsource_redhat
http://rhn.redhat.com/errata/RHSA-2016-2598.html
Release Notes, Vendor Advisory x_refsource_confirm
http://php.net/ChangeLog-5.php
Third Party Advisory x_refsource_confirm
https://security.netapp.com/advisory/ntap-20180112-0001/
Third Party Advisory, VDB Entry vdb-entry x_refsource_sectrack
http://www.securitytracker.com/id/1036430
Third Party Advisory vendor-advisory x_refsource_debian
http://www.debian.org/security/2016/dsa-3631
Release Notes, Vendor Advisory x_refsource_confirm
http://php.net/ChangeLog-7.php
Exploit, Third Party Advisory, VDB Entry exploit x_refsource_exploit-db
https://www.exploit-db.com/exploits/40155/

Scores

CVSS v3 7.8
EPSS 0.0984
EPSS Percentile 95.0%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Details

CWE
CWE-787
Status published
Products (1)
php/php < 5.5.37
Published Apr 21, 2017
Tracked Since Feb 18, 2026