CVE-2017-17912
High · 8.8CVSS
8.8
EPSS
1.8%
Published
Dec 27, 2017
CISA due date
—
Cloudanix analysis
A bug in a common picture-processing tool can let attackers peek at extra computer memory or make programs crash when they open certain image files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer over-read in ReadNewsProfile when processing TIFF images, where LocaleNCompare accesses memory past the allocated region.
Why it matters to the business
Processing untrusted images can leak sensitive memory contents or cause crashes, disrupting image-handling services and risking data exposure in graphics workflows.
How an attack unfolds
An attacker supplies a specially crafted TIFF file that triggers the over-read during NewsProfile parsing; the flaw allows reading heap data beyond bounds, potentially disclosing memory or leading to denial of service.
How to fix it
Upgrade GraphicsMagick to a version after the 2017-12-17 snapshot that resolves the over-read in coders/tiff.c; apply distribution updates for Debian and rebuild any dependent packages.
How to confirm the fix worked
Reprocess known triggering TIFF samples under memory sanitizers or bounds-checking builds and confirm no over-read occurs; verify updated package versions are installed.
Typical attack path
- Craft malicious TIFF image exploiting the NewsProfile buffer over-read
- Deliver image to application using vulnerable GraphicsMagick for processing
- Trigger ReadNewsProfile via image load or conversion
- Read or crash on out-of-bounds heap memory
How to detect it
Review application logs for abnormal TIFF processing errors or crashes involving coders/tiff.c; inspect heap dumps or sanitizer reports from image-handling services for over-read patterns.
What your security team should do
- Immediately update GraphicsMagick packages across all environments
- Restrict image processing to sanitized or trusted inputs
- Monitor for new GraphicsMagick releases and apply patches promptly
- Consider sandboxing or replacing the library in high-risk pipelines
The record
In GraphicsMagick 1.4 snapshot-20171217 Q8, there is a heap-based buffer over-read in ReadNewsProfile in coders/tiff.c, in which LocaleNCompare reads heap data beyond the allocated region.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | graphicsmagick | 0 | 1.3.27-3 |
| Debian:12 | graphicsmagick | 0 | 1.3.27-3 |
| Debian:13 | graphicsmagick | 0 | 1.3.27-3 |
| Debian:7 | graphicsmagick | 0 | 1.3.16-1.1+deb7u16 |
| Debian:8 | graphicsmagick | 0 | 1.3.20-3+deb8u3 |
| Debian:9 | graphicsmagick | 0 | 1.3.30+hg15796-1~deb9u1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | GraphicsMagick | 0 | 1.2.5-4.78.38.1 |
| SUSE:Studio Onsite 1.3 | GraphicsMagick | 0 | 1.2.5-4.78.38.1 |
| Ubuntu:16.04:LTS | graphicsmagick | 0 | 1.3.23-1ubuntu0.6 |
| Ubuntu:18.04:LTS | graphicsmagick | 0 | 1.3.27-3 |
| Ubuntu:Pro:14.04:LTS | graphicsmagick | 0 | 1.3.18-1ubuntu3.1+esm6 |
Related vulnerabilities
- CVE-2025-27796 ReadWPGImage in WPG in GraphicsMagick before 1.3.46 mishandles palette buffer allocation… Also affects graphicsmagick
- CVE-2022-1270 In GraphicsMagick, a heap buffer overflow was found when parsing MIFF. Also affects graphicsmagick
- CVE-2019-12921 In GraphicsMagick before 1.3.32, the text filename component allows remote attackers to… Also affects graphicsmagick
- CVE-2018-20184 In GraphicsMagick 1.4 snapshot-20181209 Q8, there is a heap-based buffer overflow in the… Also affects graphicsmagick
- CVE-2017-16545 The ReadWPGImage function in coders/wpg.c in GraphicsMagick 1.3.26 does not properly… Also affects graphicsmagick
- CVE-2017-16352 GraphicsMagick 1.3.26 is vulnerable to a heap-based buffer overflow vulnerability found… Also affects graphicsmagick
- CVE-2017-16353 GraphicsMagick 1.3.26 is vulnerable to a memory information disclosure vulnerability… Also affects graphicsmagick
- CVE-2017-15277 ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the… Also affects graphicsmagick