Cloudanix VulnDB

CVE-2020-12761

Critical · 9.1

CVSS

9.1

EPSS

1.6%

Published

May 9, 2020

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A bug in a common graphics library can let attackers crash programs or steal data by sending a specially made icon file.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Integer overflow in the ICO color map parser leads to undersized allocations followed by out-of-bounds reads when loading crafted icon files.

Why it matters to the business

Applications that render user-supplied icons can crash or leak memory contents, potentially exposing sensitive data or causing service outages in image-processing pipelines.

How an attack unfolds

An attacker creates an ICO file whose color-map count triggers the integer overflow during allocation; the resulting undersized buffer is then read past its bounds when the loader populates pixel data, allowing information disclosure or denial of service.

How to fix it

Upgrade imlib2 to a version containing the corrected loader_ico.c logic; if no newer package is available, disable ICO support or sandbox the image-processing component.

How to confirm the fix worked

Confirm the installed imlib2 version is newer than 1.6.0 and that the loader rejects oversized color maps; fuzz or replay the original proof-of-concept ICO to verify absence of crashes or leaks.

Typical attack path

  1. Craft a malicious ICO file containing an excessively large color-map count
  2. Deliver the file to any process that invokes imlib2's ICO loader (web upload, email attachment, document preview)
  3. Trigger image loading via normal application flow
  4. Observe process crash or extract leaked memory from the out-of-bounds read

How to detect it

Monitor application logs for segmentation faults or memory-allocation failures immediately after ICO file handling; inspect process core dumps for evidence of oversized color-map processing.

What your security team should do

  • Inventory all systems and containers that link against imlib2 and schedule upgrades
  • Add imlib2 version checks to vulnerability scanning policies
  • Restrict untrusted image formats where possible until patches are deployed

The record

modules/loaders/loader_ico.c in imlib2 1.6.0 has an integer overflow (with resultant invalid memory allocations and out-of-bounds reads) via an icon with many colors in its color map.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 imlib2 0 1.6.1-2
Debian:12 imlib2 0 1.6.1-2
Debian:13 imlib2 0 1.6.1-2
Ubuntu:20.04:LTS imlib2 0 1.6.1-1ubuntu0.1
openSUSE:Tumbleweed imlib2 0 1.11.1-2.1

Related vulnerabilities