CVE-2017-12875
Medium · 6.5CVSS
6.5
EPSS
2.4%
Published
Aug 29, 2017
CISA due date
—
Cloudanix analysis
Attackers can send a specially made picture file that makes image-handling software use up all available processing power and stop responding.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The WritePixelCachePixels function in ImageMagick allows a specially crafted file to trigger unbounded CPU consumption, resulting in denial of service.
Why it matters to the business
Services that process untrusted images can experience sudden resource exhaustion, leading to degraded performance or outages until the affected processes are restarted.
How an attack unfolds
An attacker prepares a malicious image file designed to exercise the vulnerable pixel cache code path and supplies it to any application or service that uses the affected ImageMagick version for image handling.
How to fix it
Upgrade affected packages to the fixed versions: cortex (Chainguard) 1.16.0-r3 or cortex (Wolfi) 1.16.0-r3, and rebuild any dependent containers or deployments.
How to confirm the fix worked
Verify that the installed ImageMagick or cortex package reports version 1.16.0-r3 or later, and test that crafted files no longer produce excessive CPU usage.
Typical attack path
- Craft a malicious image file that triggers the vulnerable code path
- Deliver the file to a target service that invokes ImageMagick
- Trigger file processing through normal application workflows
- Induce sustained high CPU usage leading to denial of service
How to detect it
Review application and system logs for image-processing tasks that consume abnormally high CPU; correlate with file uploads or processing events around the time of performance degradation.
What your security team should do
- Apply the listed package upgrades as the highest priority
- Add size and format validation for all incoming image files
- Monitor CPU utilization on image-processing workloads for anomalous spikes
The record
The WritePixelCachePixels function in ImageMagick 7.0.6-6 allows remote attackers to cause a denial of service (CPU consumption) via a crafted file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | imagemagick | 0 | 8:6.9.9.34+dfsg-3 |
| Debian:11 | imagemagick | 0 | 8:6.9.9.34+dfsg-3 |
| Debian:12 | imagemagick | 0 | 8:6.9.9.34+dfsg-3 |
| Debian:13 | imagemagick | 0 | 8:6.9.9.34+dfsg-3 |
| Debian:7 | imagemagick | 0 | 8:6.7.7.10-5+deb7u17 |
| Debian:8 | imagemagick | 0 | 8:6.8.9.9-5+deb8u16 |
| Debian:9 | imagemagick | 0 | 8:6.9.7.4+dfsg-11+deb9u10 |
| Ubuntu:14.04:LTS | imagemagick | 0 | 8:6.7.7.10-6ubuntu3.11 |
| Ubuntu:16.04:LTS | imagemagick | 0 | 8:6.8.9.9-7ubuntu5.11 |
| Ubuntu:18.04:LTS | imagemagick | 0 | 8:6.9.7.4+dfsg-16ubuntu6.2 |
Related vulnerabilities
- CVE-2017-17682 In ImageMagick 7.0.7-12 Q16, a large loop vulnerability was found in the function… Also affects imagemagick
- CVE-2017-17681 In ImageMagick 7.0.7-12 Q16, an infinite loop vulnerability was found in the function… Also affects imagemagick
- CVE-2017-15281 ReadPSDImage in coders/psd.c in ImageMagick 7.0.7-6 allows remote attackers to cause a… Also affects imagemagick
- CVE-2017-15017 ImageMagick 7.0.7-0 Q16 has a NULL pointer dereference vulnerability in ReadOneMNGImage… Also affects imagemagick
- CVE-2017-15015 ImageMagick 7.0.7-0 Q16 has a NULL pointer dereference vulnerability in… Also affects imagemagick
- CVE-2017-14739 The AcquireResampleFilterThreadSet function in magick/resample-private.h in ImageMagick… Also affects imagemagick
- CVE-2017-14741 The ReadCAPTIONImage function in coders/caption.c in ImageMagick 7.0.7-3 allows remote… Also affects imagemagick
- CVE-2017-14626 ImageMagick 7.0.7-0 Q16 has a NULL Pointer Dereference vulnerability in the function… Also affects imagemagick