Cloudanix VulnDB

CVE-2017-1000229

High · 7.8

CVSS

7.8

EPSS

2.0%

Published

Nov 17, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in an older image-optimization program lets attackers take control of a computer or crash it simply by getting the program to open a specially crafted picture file.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Remote Code Execution
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Integer overflow in minitiff_read_info() leads to memory corruption that can be leveraged for arbitrary code execution or denial of service when processing a crafted image file.

Why it matters to the business

Systems that use optipng to optimize PNG images face risk of remote compromise or service disruption when handling untrusted files; the issue has been public since 2017 with public exploits available yet low observed exploitation rates.

How an attack unfolds

An attacker crafts a malicious TIFF or PNG image that triggers the integer overflow during parsing in minitiff_read_info(). The victim opens the file with optipng on the command line or via an automated pipeline, causing memory corruption that the attacker turns into code execution or a crash.

How to fix it

Upgrade optipng to a version newer than 0.7.6 that contains the fix for the integer overflow; rebuild any packages that statically link the vulnerable minitiff code; replace optipng with an alternative PNG optimizer if no patched build is available.

How to confirm the fix worked

Run optipng --version to confirm the installed release is newer than 0.7.6; test the binary against known proof-of-concept images in an isolated environment and verify absence of crashes or unexpected memory allocation; scan build pipelines for references to the vulnerable 0.7.6 release.

Typical attack path

  1. Attacker prepares a specially malformed image file exploiting the integer overflow
  2. Malicious file is delivered via email, web download, or supply-chain artifact
  3. Victim or automated process invokes optipng on the file
  4. Integer overflow occurs in minitiff_read_info() resulting in memory corruption
  5. Attacker payload executes or the process crashes

How to detect it

Search process execution logs and command-line audit records for optipng invocations against files originating outside trusted sources; monitor for segmentation faults or abnormal memory usage when optipng processes PNG or TIFF files; review any crash dumps or core files containing references to minitiff_read_info.

What your security team should do

  • Immediately inventory all systems and CI/CD pipelines that invoke optipng
  • Block processing of untrusted image files with optipng until patched
  • Prioritize upgrade of any remaining optipng 0.7.6 instances given public exploit availability
  • Add optipng version checks to software composition analysis rules

The record

Integer overflow bug in function minitiff_read_info() of optipng 0.7.6 allows an attacker to remotely execute code or cause denial of service.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 optipng 0 0.7.6-1.1
Debian:12 optipng 0 0.7.6-1.1
Debian:13 optipng 0 0.7.6-1.1
Debian:7 optipng 0 0.6.4-1+deb7u3
Debian:8 optipng 0 0.7.5-1+deb8u2
Debian:9 optipng 0 0.7.6-1+deb9u1
Mageia:5 optipng 0 0.7.6-1.1.mga5
Mageia:6 optipng 0 0.7.6-1.1.mga6
Ubuntu:14.04:LTS optipng 0 0.6.4-1ubuntu0.14.04.2
Ubuntu:16.04:LTS optipng 0 0.7.6-1ubuntu0.16.04.1
openSUSE:Tumbleweed optipng 0 0.7.7-2.3

Related vulnerabilities