---
title: "CVE-2016-5688\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-5688?format=md
keywords: index, follow
---

# CVE-2016-5688

Publication date 24 June 2016

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

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

## Cvss 3 Severity Score

**8.1 · High**

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

Toggle side navigation

## Description

The WPG parser in ImageMagick before 6.9.4-4 and 7.x before 7.0.1-5, when a
memory limit is set, allows remote attackers to have unspecified impact via
vectors related to the SetImageExtent return-value check, which trigger (1)
a heap-based buffer overflow in the SetPixelIndex function or an invalid
write operation in the (2) ScaleCharToQuantum or (3) SetPixelIndex
functions.

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

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| imagemagick | 16.10 yakkety | Fixed 8:6.8.9.9-7ubuntu8.1 |
| 16.04 LTS xenial | Fixed 8:6.8.9.9-7ubuntu5.2 |
| 15.10 wily | Ignored end of life |
| 14.04 LTS trusty | Fixed 8:6.7.7.10-6ubuntu3.2 |
| 12.04 LTS precise | Fixed 8:6.6.9.7-5ubuntu3.5 |

---

* [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-5688?format=md#patch-details)

## Notes

---

### [mdeslaur](https://launchpad.net/~mdeslaur)

This is 0131-Ensure-image-extent-does-not-exceed-maximum-for-wpg-.patch,
0132-Set-pixel-cache-to-undefined-if-any-resource-limit-i.patch,
0133-Fix-allocation-of-memory-for-CVE-2016-5688.patch

### 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 |
| --- | --- |
| imagemagick | * Upstream:   [f7c2e89](https://github.com/ImageMagick/ImageMagick/commit/f7c2e897c0f990d663026055a2b40e1be7e16ede) * Upstream:   [fc43974](https://github.com/ImageMagick/ImageMagick/commit/fc43974d34318c834fbf78570ca1a3764ed8c7d7) * Upstream:   [aecd0ad](https://github.com/ImageMagick/ImageMagick/commit/aecd0ada163a4d6c769cec178955d5f3e9316f2f) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

8.1 · High

* Base metrics

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

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

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

## References

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

### Related Ubuntu Security Notices (USN)

+ [USN-3131-1](https://usn.ubuntu.com/USN-3131-1)
+ ImageMagick vulnerabilities
+ 21 November 2016

### Other references

* <https://blog.fuzzing-project.org/46-Various-invalid-memory-reads-in-ImageMagick-WPG,-DDS,-DCM.html>
* <https://www.cve.org/CVERecord?id=CVE-2016-5688>
