CVE-2020-12761
Critical · 9.1CVSS
9.1
EPSS
1.6%
Published
May 9, 2020
CISA due date
—
Cloudanix analysis
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
- Craft a malicious ICO file containing an excessively large color-map count
- Deliver the file to any process that invokes imlib2's ICO loader (web upload, email attachment, document preview)
- Trigger image loading via normal application flow
- 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
- CVE-2024-25450 imlib2 v1.9.1 was discovered to mishandle memory allocation in the function… Also affects imlib2
- CVE-2024-25448 An issue in the imlib_free_image_and_decache function of imlib2 v1.9.1 allows attackers… Also affects imlib2
- CVE-2024-25447 An issue in the imlib_load_image_with_error_return function of imlib2 v1.9.1 allows… Also affects imlib2
- CVE-2011-5326 imlib2 before 1.4.9 allows remote attackers to cause a denial of service (divide-by-zero… Also affects imlib2
- CVE-2026-92824 A flaw was found in libmodulemd. CWE-125
- CVE-2026-114038 A flaw was found in device-mapper-multipath. CWE-125
- CVE-2026-112896 Pillow is a Python imaging library. CWE-125
- CVE-2026-112278 rdesktop through 1.9.0 contains a heap out-of-bounds read vulnerability in… CWE-125