Cloudanix VulnDB

CVE-2021-46700

Medium · 6.5

CVSS

6.5

EPSS

1.0%

Published

Feb 19, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in an image library can make programs that handle certain picture files crash when they receive a specially made file.

Exploit Available
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

Double-free memory corruption in sixel_encoder_output_without_macro (called via sixel_encoder_encode_frame) allows an attacker-supplied sixel image to trigger repeated deallocation of the same heap buffer, resulting in heap metadata corruption and a process crash.

Why it matters to the business

Image-processing applications or services that accept untrusted sixel content can be forced offline, causing availability loss for dependent workflows until the affected process or host is restarted.

How an attack unfolds

An attacker crafts a malicious sixel image that exercises the double-free path inside sixel_encoder_encode_frame; when the victim application decodes or encodes the image, the library frees the same pointer twice, corrupting heap state and terminating the process.

How to fix it

Upgrade to a version of libsixel that contains the fix for the double-free condition; if no patched release is available, replace the library with an alternative sixel implementation or disable sixel processing for untrusted input.

How to confirm the fix worked

Rebuild or run the application against a test suite containing the previously crashing sixel sample; confirm absence of crash and that heap sanitizers (ASAN, Valgrind) report no double-free on the same input.

Typical attack path

  1. Identify a target application or service that uses libsixel to handle sixel images
  2. Deliver a crafted sixel payload via network upload, file attachment, or web rendering
  3. Trigger image processing in sixel_encoder_encode_frame
  4. Induce double free and resulting crash or denial of service

How to detect it

Review application or library logs for segmentation faults, abort signals, or heap-error messages immediately after sixel image processing; correlate with incoming image uploads or rendering requests around the same timestamp.

What your security team should do

  • Prioritize patching or replacing libsixel in any internet-facing or multi-tenant image-processing paths
  • Add sixel decoding to the list of untrusted input formats that require sandboxing or resource limits
  • Monitor EPSS trend and exploit availability; schedule remediation within normal change windows given moderate exploit maturity

The record

In libsixel 1.8.6, sixel_encoder_output_without_macro (called from sixel_encoder_encode_frame in encoder.c) has a double free.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libsixel 0 No fix
Debian:12 libsixel 0 No fix
Debian:13 libsixel 0 No fix
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