Junglewise Threat Intelligence

CVE-2016-9298: ImageMagick heap overflow in WaveletDenoiseImage

CVE-2016-9298 · Severity: medium · CVSS 5.5 · Published 2017-01-27

Technologies: ImageMagick. Vendors: ImageMagick.

Executive brief

ImageMagick, a widely used software suite for displaying and editing images, is vulnerable to a memory-related flaw. By tricking a user or an automated system into processing a specially crafted image file, an attacker can cause the application to crash. This can lead to a denial-of-service, disrupting business operations that rely on automated image processing or web-based image uploads.

Technical details

A heap-based buffer overflow exists in the WaveletDenoiseImage function within MagickCore/fx.c. The vulnerability is caused by an off-by-one error in memory allocation where the 'kernel' buffer is allocated using AcquireQuantumMemory without accounting for an additional required element. An attacker can exploit this by providing a specially crafted image that triggers the wavelet denoise operation, leading to a memory corruption and subsequent crash. The issue is resolved in versions 6.9.6-4 and 7.0.3-6 by incrementing the allocation size by one.

Affected products

  • ImageMagick ImageMagick before 6.9.6-4, 7.x before 7.0.3-6

Timeline

  • 2016-11-13: disclosed: Vulnerability reported on oss-security mailing list
  • 2016-11-14: advisory: CVE-2016-9298 assigned
  • 2017-01-27: advisory: NVD publication date

References