CVE-2016-7799
Medium · 6.5CVSS
6.5
EPSS
3.7%
Published
Jan 18, 2017
CISA due date
—
Cloudanix analysis
A flaw in widely used image software can cause it to stop working when it tries to handle certain specially created files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw permits an out-of-bounds read in MagickCore/profile.c during profile parsing, causing a denial of service when a crafted image file is processed.
Why it matters to the business
Image processing services can become temporarily unavailable when handling malicious files, potentially disrupting workflows that depend on image manipulation in older installations.
How an attack unfolds
An attacker crafts a file that triggers the out-of-bounds read in profile handling. The file is sent to a target who opens it in an affected ImageMagick version, resulting in an application crash without requiring elevated privileges.
How to fix it
Upgrade to a build containing commit a7bb158b7bedd1449a34432feb3a67c8f1873bfa or later; rebuild from source if using GIT checkout and verify the commit is present.
How to confirm the fix worked
Confirm the installed version includes the referenced commit hash; test with known crafted files to ensure no crash occurs during profile parsing.
Typical attack path
- Create a malicious image file that exploits the profile parsing logic
- Deliver the file through email, web download, or other means
- Victim opens or processes the file with a vulnerable ImageMagick build
- Out-of-bounds read occurs leading to denial of service
How to detect it
Review application and system logs for segmentation faults or crashes during image file processing; inspect recent input files for unusual profile sections if crashes are observed.
What your security team should do
- Prioritize updating all ImageMagick installations to the fixed commit
- Replace or rebuild packages that pull in older versions
- Restrict image processing to trusted inputs where possible until patched
The record
MagickCore/profile.c in ImageMagick before 7.0.3-2 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.2 | imagemagick | 0 | 6.9.6.8-r0 |
| Alpine:v3.3 | imagemagick | 0 | 6.9.6.8-r0 |
| Alpine:v3.4 | imagemagick | 0 | 6.9.5.9-r1 |
| Debian:11 | imagemagick | 0 | 8:6.9.6.2+dfsg-2 |
| Debian:12 | imagemagick | 0 | 8:6.9.6.2+dfsg-2 |
| Debian:13 | imagemagick | 0 | 8:6.9.6.2+dfsg-2 |
| Debian:7 | imagemagick | 0 | 8:6.7.7.10-5+deb7u10 |
| Debian:8 | imagemagick | 0 | 8:6.8.9.9-5+deb8u6 |
| Mageia:6 | converseen | 0 | 0.9.6.2-1.3.mga6 |
| Mageia:6 | cuneiform-linux | 0 | 1.1.0-9.2.mga6 |
| Mageia:6 | dvdauthor | 0 | 0.7.2-2.2.mga6 |
| Mageia:6 | emacs | 0 | 24.5-8.3.mga6 |
| Mageia:6 | imagemagick | 0 | 6.9.9.41-1.mga6 |
| Mageia:6 | inkscape | 0 | 0.92.1-2.2.mga6 |
| Mageia:6 | k3d | 0 | 0.8.0.5-5.2.mga6 |
| Mageia:6 | kxstitch | 0 | 2.0.0-2.2.mga6 |
| Mageia:6 | libopenshot | 0 | 0.1.8-1.2.mga6 |
| Mageia:6 | ocaml-glmlite | 0 | 0.03.51-17.2.mga6 |
| Mageia:6 | perl-Image-SubImageFind | 0 | 0.30.0-6.2.mga6 |
| Mageia:6 | pfstools | 0 | 2.0.6-3.2.mga6 |
| Mageia:6 | php-imagick | 0 | 3.4.1-6.2.mga6 |
| Mageia:6 | php-magickwand | 0 | 1.0.9.2-10.2.mga6 |
| Mageia:6 | psiconv | 0 | 0.9.8-26.2.mga6 |
| Mageia:6 | pythonmagick | 0 | 0.9.12-7.2.mga6 |
| Mageia:6 | ruby-rmagick | 0 | 2.15.4-12.2.mga6 |
| Mageia:6 | synfig | 0 | 1.2.1-2.2.mga6 |
| Mageia:6 | vdr-plugin-skinelchi | 0 | 0.2.8-8.2.mga6 |
| Mageia:6 | vdr-plugin-skinenigmang | 0 | 0.1.2-10.2.mga6 |
| SUSE:Linux Enterprise Desktop 12 SP1 | ImageMagick | 0 | 6.8.8.1-40.1 |
| SUSE:Linux Enterprise Server 11 SP4 | ImageMagick | 0 | 6.4.3.6-7.54.1 |
| SUSE:Linux Enterprise Server 12 SP1 | ImageMagick | 0 | 6.8.8.1-40.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | ImageMagick | 0 | 6.4.3.6-7.54.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | ImageMagick | 0 | 6.8.8.1-40.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | ImageMagick | 0 | 6.4.3.6-7.54.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | ImageMagick | 0 | 6.8.8.1-40.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP1 | ImageMagick | 0 | 6.8.8.1-40.1 |
| Ubuntu:14.04:LTS | imagemagick | 0 | 8:6.7.7.10-6ubuntu3.3 |
| Ubuntu:16.04:LTS | imagemagick | 0 | 8:6.8.9.9-7ubuntu5.3 |
Related vulnerabilities
- CVE-2016-5841 Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote… Also affects imagemagick
- CVE-2016-5118 The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows… Also affects imagemagick
- CVE-2014-2030 Stack-based buffer overflow in the WritePSDImage function in coders/psd.c in ImageMagick… Also affects imagemagick
- CVE-2017-15277 ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the… Also affects imagemagick
- CVE-2017-14528 The TIFFSetProfiles function in coders/tiff.c in ImageMagick 7.0.6 has incorrect… Also affects imagemagick
- CVE-2017-13144 In ImageMagick before 6.9.7-10, there is a crash (rather than a "width or height exceeds… Also affects imagemagick
- CVE-2017-10928 In ImageMagick 7.0.6-0, a heap-based buffer over-read in the GetNextToken function in… Also affects imagemagick
- CVE-2014-8354 The HorizontalFilter function in resize.c in ImageMagick before 6.8.9-9 allows remote… Also affects imagemagick