---
title: "CVE-2016-5399\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2016-5399?format=md
keywords: index, follow
---

# CVE-2016-5399

Publication date 22 July 2016

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**7.8 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2016-5399?format=md#impact-score)

Toggle side navigation

## 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.

[Read the notes from the security team](https://ubuntu.com/security/CVE-2016-5399?format=md#notes)

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| php5 | 16.04 LTS xenial | Not in release |
| 15.10 wily | Ignored end of life |
| 14.04 LTS trusty | Fixed 5.5.9+dfsg-1ubuntu4.19 |
| 12.04 LTS precise | Fixed 5.3.10-1ubuntu3.24 |
| php7.0 | 16.04 LTS xenial | Fixed 7.0.8-0ubuntu0.16.04.2 |
| 15.10 wily | Not in release |
| 14.04 LTS trusty | Not in release |
| 12.04 LTS precise | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2016-5399?format=md#patch-details)

## Notes

---

### [seth-arnold](https://launchpad.net/~seth-arnold)

PHP position seems to suggest they'll fix bzread() to ensure
it conforms to the documented behaviour but they won't take any steps
to 'safe' an improper use of API by applications. Since the API was
apparently not honoured before I don't know how an application could be
expected to be correct.

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| php5 | * Upstream:   <http://git.php.net/?p=php-src.git;a=commit;h=f3feddb5b45b5abd93abb1a95044b7e099d51c84> |
| php7.0 | * Upstream:   <http://git.php.net/?p=php-src.git;a=commit;h=f3feddb5b45b5abd93abb1a95044b7e099d51c84> |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

7.8 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Local |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | Required |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 7.8 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5399)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2016-5399)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2016-5399)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2016-5399)

### Related Ubuntu Security Notices (USN)

+ [USN-3045-1](https://usn.ubuntu.com/USN-3045-1)
+ PHP vulnerabilities
+ 2 August 2016

### Other references

* <http://php.net/ChangeLog-7.php#7.0.9>
* <https://www.cve.org/CVERecord?id=CVE-2016-5399>
