CVE-2017-16546

NameCVE-2017-16546
DescriptionThe ReadWPGImage function in coders/wpg.c in ImageMagick 7.0.7-9 does not properly validate the colormap index in a WPG palette, which allows remote attackers to cause a denial of service (use of uninitialized data or invalid memory allocation) or possibly have unspecified other impact via a malformed WPG file.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDSA-4040-1, DSA-4074-1
NVD severitymedium (attack range: remote)
Debian Bugs881392

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
imagemagick (PTS)wheezy8:6.7.7.10-5+deb7u4fixed
wheezy (security)8:6.7.7.10-5+deb7u20fixed
jessie (security), jessie8:6.8.9.9-5+deb8u11fixed
stretch8:6.9.7.4+dfsg-11+deb9u3vulnerable
stretch (security)8:6.9.7.4+dfsg-11+deb9u4fixed
buster, sid8:6.9.7.4+dfsg-16vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
imagemagicksource(unstable)(unfixed)medium881392
imagemagicksourcejessie8:6.8.9.9-5+deb8u11mediumDSA-4040-1
imagemagicksourcestretch8:6.9.7.4+dfsg-11+deb9u4mediumDSA-4074-1
imagemagicksourcewheezy(not affected)

Notes

[wheezy] - imagemagick <not-affected> (Vulnerable code not present; PoC from GitHub issue results in memory allocation exception thrown at coders/wpg.c:1109 and valgrind does not report any issues)
https://github.com/ImageMagick/ImageMagick/commit/2130bf6f89ded32ef0c88a11694f107c52566c53
ImageMagick-6: https://github.com/ImageMagick/ImageMagick/commit/e04cf3e9524f50ca336253513d977224e083b816
https://github.com/ImageMagick/ImageMagick/issues/851

Search for package or bug name: Reporting problems