CVE-2017-15017
High · 8.8CVSS
8.8
EPSS
2.0%
Published
Oct 5, 2017
CISA due date
—
Cloudanix analysis
A bug in widely used image-handling software can let attackers crash programs or take control of systems simply by getting them to open a specially crafted picture file.
- 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
NULL pointer dereference in ReadOneMNGImage within ImageMagick's PNG/MNG handling code causes memory corruption that can lead to application crash or arbitrary code execution when processing a malicious image.
Why it matters to the business
Attackers could disrupt image-processing services, exfiltrate data, or gain remote control of affected systems, potentially causing outages in any workflows that rely on image libraries for untrusted content.
How an attack unfolds
An attacker crafts a malformed MNG or PNG image that triggers the NULL dereference path in ReadOneMNGImage, then delivers the file through any input channel that causes the vulnerable ImageMagick code to parse it, resulting in a crash or code execution on the target system.
How to fix it
Upgrade to a patched ImageMagick release that eliminates the NULL dereference. For flux-image-reflector-controller (Chainguard) and flux-image-reflector-controller (Wolfi) update to the versions listed as fixed in 0. Remove or restrict processing of untrusted images until patches are applied.
How to confirm the fix worked
Confirm the installed ImageMagick library version is newer than 7.0.7-0 and test that the ReadOneMNGImage function no longer crashes on the previously triggering image samples; re-scan affected packages to verify the fixed version strings.
Typical attack path
- Identify an application or service that processes user-supplied images using the vulnerable ImageMagick version
- Generate a specially malformed MNG/PNG file that reaches the ReadOneMNGImage function
- Deliver the file via upload, download, email attachment, or other accepted input vector
- Trigger parsing to cause the NULL dereference and achieve crash or code execution
How to detect it
Review application and system logs for ImageMagick crashes or segmentation faults during image parsing; look for unusual process terminations or error messages referencing png.c or ReadOneMNGImage around the time of suspected attacks.
What your security team should do
- Apply the listed fixed versions for flux-image-reflector-controller (Chainguard) and flux-image-reflector-controller (Wolfi) immediately
- Inventory all systems using ImageMagick 7.0.7-0 or earlier and prioritize patching based on exposure to untrusted images
- Implement content-type validation and sandboxing for image processing until upgrades are complete
The record
ImageMagick 7.0.7-0 Q16 has a NULL pointer dereference vulnerability in ReadOneMNGImage in coders/png.c.
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 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Server 11 SP4 | ImageMagick | 0 | 6.4.3.6-78.40.1 |
| SUSE:Linux Enterprise Server 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Server 12 SP3 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | ImageMagick | 0 | 6.4.3.6-78.40.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | GraphicsMagick | 0 | 1.2.5-78.44.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | ImageMagick | 0 | 6.4.3.6-78.40.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP2 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | ImageMagick | 0 | 6.8.8.1-71.47.1 |
| SUSE:Studio Onsite 1.3 | GraphicsMagick | 0 | 1.2.5-78.44.1 |
| 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-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
- CVE-2017-14625 ImageMagick 7.0.7-0 Q16 has a NULL Pointer Dereference vulnerability in the function… Also affects imagemagick