Cloudanix VulnDB

CVE-2017-14165

Medium · 6.5

CVSS

6.5

EPSS

2.3%

Published

Sep 6, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A problem in image-handling software can let attackers crash programs by sending a specially made picture file, which may stop services that read or check images from working.

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

Excessive memory allocation in ReadSUNImage driven solely by an untrusted length field in the SUN image header, causing MagickMalloc to exhaust resources and trigger remote denial of service.

Why it matters to the business

Services that scan or convert images can be forced offline or slowed dramatically when they encounter a malicious file, interrupting security scanning pipelines and image-processing workflows.

How an attack unfolds

An attacker creates a SUN image whose header length field is set to a huge value, delivers the file to any application using the vulnerable GraphicsMagick library for parsing, and the library allocates far more memory than needed, crashing the process.

How to fix it

Upgrade harbor-scanner-trivy (Chainguard) to 0.31.2-r2 or later and harbor-scanner-trivy (Wolfi) to 0.31.2-r2 or later; alternatively update the underlying GraphicsMagick package to a version that bounds header-driven allocations.

How to confirm the fix worked

Confirm the installed package versions match or exceed the listed fixed releases; reprocess a set of known-good and boundary-case SUN images and verify memory usage remains within expected limits.

Typical attack path

  1. Craft a SUN raster image containing an oversized header length field
  2. Deliver the image to the target via file upload, download, or email attachment
  3. Trigger image parsing through GraphicsMagick's ReadSUNImage function
  4. Observe memory exhaustion and service denial

How to detect it

Review application and system logs for GraphicsMagick memory-allocation failures or abrupt process termination while handling SUN or other image formats; correlate spikes in memory usage with recent image-processing events.

What your security team should do

  • Apply the specified package upgrades across all affected scanner deployments without delay
  • Isolate image-processing workloads in resource-limited containers or sandboxes
  • Add file-type and size validation before invoking GraphicsMagick on untrusted input

The record

The ReadSUNImage function in coders/sun.c in GraphicsMagick 1.3.26 has an issue where memory allocation is excessive because it depends only on a length field in a header. This may lead to remote denial of service in the MagickMalloc function in magick/memory.c.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 graphicsmagick 0 1.3.26-9
Debian:11 graphicsmagick 0 1.3.26-9
Debian:12 graphicsmagick 0 1.3.26-9
Debian:13 graphicsmagick 0 1.3.26-9
SUSE:Linux Enterprise Software Development Kit 11 SP4 GraphicsMagick 0 1.2.5-4.78.19.1
SUSE:Studio Onsite 1.3 GraphicsMagick 0 1.2.5-4.78.19.1
Ubuntu:16.04:LTS graphicsmagick 0 1.3.23-1ubuntu0.4
Ubuntu:Pro:14.04:LTS graphicsmagick 0 1.3.18-1ubuntu3.1+esm4

Related vulnerabilities