Cloudanix VulnDB

CVE-2021-40656

High · 8.8

CVSS

8.8

EPSS

1.0%

Published

Apr 8, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in software that handles certain image files could let attackers take over your computer if you open a specially made image.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Full Compromise
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Buffer overflow in libsixel/src/quant.c:867 allows memory corruption when processing crafted SIXEL images, enabling arbitrary code execution.

Why it matters to the business

Applications using libsixel for image decoding face risk of remote code execution via malicious images, potentially leading to system compromise; high CVSS and available exploit increase urgency despite low EPSS and no KEV listing.

How an attack unfolds

An attacker crafts a malicious SIXEL image that triggers the buffer overflow in the quantization routine upon processing by a vulnerable libsixel instance, achieving memory corruption and code execution.

How to fix it

Upgrade libsixel to commit fb329124fd4bce693d3fc57447b0b40f62d9f090 or later; for affected Debian iceweasel packages, apply the listed fixed versions such as 2.0.0.10-0etch1.

How to confirm the fix worked

Verify installed libsixel version is at or above the fixed commit; test image processing with known-good and crafted SIXEL samples to confirm absence of overflow.

Typical attack path

  1. Identify target application or service that processes SIXEL images using vulnerable libsixel
  2. Craft a malicious SIXEL image exploiting the overflow in quant.c
  3. Deliver the image to the victim (e.g., via web, email, or file share)
  4. Victim application parses the image, triggering the buffer overflow
  5. Achieve code execution and potential persistence or lateral movement

How to detect it

Review application logs for crashes or errors during SIXEL image processing; inspect for unexpected process behavior or memory anomalies around image decoding; correlate with file access to suspicious SIXEL images.

What your security team should do

  • Immediately update all instances of libsixel to the fixed commit or patched package versions
  • Scan environments for usage of vulnerable libsixel in image-handling workflows
  • Monitor for new exploit activity given the available public exploit
  • Implement input validation or sandboxing for image processing where upgrades are delayed

The record

libsixel before 1.10 is vulnerable to Buffer Overflow in libsixel/src/quant.c:867.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libsixel 0 No fix
Debian:12 libsixel 0 1.10.3-1
Debian:13 libsixel 0 1.10.3-1
Ubuntu:16.04:LTS libsixel 0 No fix
Ubuntu:18.04:LTS libsixel 0 No fix
Ubuntu:20.04:LTS libsixel 0 No fix
Ubuntu:22.04:LTS libsixel 0 No fix
Ubuntu:24.04:LTS libsixel 0 No fix
Ubuntu:24.10 libsixel 0 No fix
Ubuntu:25.04 libsixel 0 No fix
Ubuntu:25.10 libsixel 0 No fix
Ubuntu:Pro:16.04:LTS libsixel 0 No fix
Ubuntu:Pro:18.04:LTS libsixel 0 No fix
Ubuntu:Pro:20.04:LTS libsixel 0 No fix

Related vulnerabilities