CVE-2017-14528
Medium · 6.5CVSS
6.5
EPSS
2.6%
Published
Sep 18, 2017
CISA due date
—
Cloudanix analysis
A flaw in image processing software can make programs crash when they open certain specially made picture files, potentially disrupting any work that relies on handling images.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The TIFFSetProfiles function in ImageMagick 7.0.6 makes incorrect assumptions about LibTIFF TIFFGetField return values implying data validation, leading to a use-after-free when an invalid call to TIFFSetField occurs on a crafted TIFF file, resulting in application crash.
Why it matters to the business
Processing of untrusted image files can cause the application to crash, interrupting image handling operations and requiring restarts or workarounds for affected workflows.
How an attack unfolds
An attacker crafts a malicious TIFF file that triggers incorrect assumptions in TIFFGetField return handling, causing ImageMagick to perform an invalid TIFFSetField call that leads to use-after-free and denial of service upon file processing.
How to fix it
Upgrade ImageMagick to a version later than 7.0.6 that resolves the TIFF handling assumptions; apply vendor patches for affected distributions such as Debian; avoid processing untrusted TIFF files until updated.
How to confirm the fix worked
Test processing of known-good and crafted TIFF samples in the updated ImageMagick build to confirm absence of crash; review release notes or changelogs for TIFFSetProfiles fixes; scan affected systems for versions prior to the patched release.
Typical attack path
- Attacker creates a specially crafted TIFF image file designed to trigger invalid LibTIFF field handling.
- Victim or automated system opens or converts the malicious file using ImageMagick.
- ImageMagick calls TIFFSetProfiles which mishandles return values and performs use-after-free.
- Application crashes, achieving denial of service.
How to detect it
Review application logs and crash dumps for ImageMagick processes handling TIFF files; look for segmentation faults or use-after-free related error messages around the time of file processing; examine system logs for repeated crashes on image conversion or thumbnail generation tasks.
What your security team should do
- Prioritize upgrade of all ImageMagick installations to patched versions.
- Implement file-type validation and sandboxing for image processing pipelines.
- Monitor for application crashes during TIFF handling as a temporary indicator.
- Review and restrict processing of external or user-supplied image files until remediated.
The record
The TIFFSetProfiles function in coders/tiff.c in ImageMagick 7.0.6 has incorrect expectations about whether LibTIFF TIFFGetField return values imply that data validation has occurred, which allows remote attackers to cause a denial of service (use-after-free after an invalid call to TIFFSetField, and application crash) via a crafted file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | imagemagick | 0 | 8:6.9.10.2+dfsg-2 |
| Debian:12 | imagemagick | 0 | 8:6.9.10.2+dfsg-2 |
| Debian:13 | imagemagick | 0 | 8:6.9.10.2+dfsg-2 |
| Debian:9 | imagemagick | 0 | 8:6.9.7.4+dfsg-11+deb9u11 |
| Ubuntu:18.04:LTS | imagemagick | 0 | 8:6.9.7.4+dfsg-16ubuntu6.11 |
| Ubuntu:20.04:LTS | imagemagick | 0 | 8:6.9.10.23+dfsg-2.1ubuntu11.4 |
| Ubuntu:Pro:14.04:LTS | imagemagick | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | imagemagick | 0 | No fix |
Related vulnerabilities
- 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-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
- CVE-2017-7606 coders/rle.c in ImageMagick 7.0.5-4 has an "outside the range of representable values of… Also affects imagemagick
- CVE-2017-6498 An issue was discovered in ImageMagick 6.9.7. Also affects imagemagick
- CVE-2016-10062 The ReadGROUP4Image function in coders/tiff.c in ImageMagick does not check the return… Also affects imagemagick