Heap-based buffer overflow in ImageMagick - CVE-2016-5688
Published: December 13, 2016 / Updated: July 28, 2020
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to a boundary error in The WPG parser in ImageMagick before 6.9.4-4 and 7.x before 7.0.1-5, when a memory limit is set,. A remote attacker can use vectors related to the SetImageExtent return-value check to trigger heap-based buffer overflow and execute arbitrary code on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
imagemagick (Alpine package)
How to mitigate CVE-2016-5688
imagemagick (Alpine package) - update to 6.9.6.8-r0
External References
- http://www.openwall.com/lists/oss-security/2016/06/14/5
- http://www.openwall.com/lists/oss-security/2016/06/17/3
- http://www.oracle.com/technetwork/topics/security/bulletinjul2016-3090568.html
- http://www.securityfocus.com/bid/91283
- https://blog.fuzzing-project.org/46-Various-invalid-memory-reads-in-ImageMagick-WPG,-DDS,-DCM.html
- https://github.com/ImageMagick/ImageMagick/commit/aecd0ada163a4d6c769cec178955d5f3e9316f2f
- https://github.com/ImageMagick/ImageMagick/commit/fc43974d34318c834fbf78570ca1a3764ed8c7d7
- https://github.com/ImageMagick/ImageMagick/commits/6.9.4-4
- https://github.com/ImageMagick/ImageMagick/commits/7.0.1-5