CVE-2021-41715
High · 8.8CVSS
8.8
EPSS
1.0%
Published
Apr 8, 2022
CISA due date
—
Cloudanix analysis
A bug in a graphics library can let attackers take control of a computer simply by getting a user to view a specially made image file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in libsixel/src/dither.c:379 allows memory corruption that can lead to arbitrary code execution or denial of service when processing crafted SIXEL images.
Why it matters to the business
Applications relying on the vulnerable library risk remote compromise when users open malicious graphics, potentially resulting in data theft or system takeover; the flaw has been public for over four years with available exploits.
How an attack unfolds
An attacker creates a specially crafted SIXEL image that triggers the use-after-free condition during dithering; when the image is opened in an affected application the freed memory is reused, enabling code execution. Public exploits exist and the issue has been known since 2022.
How to fix it
Upgrade mantis (Debian 3.0) to version 0.17.1-2.5 or later; rebuild or replace any other packages shipping libsixel 1.10.0 with a patched build.
How to confirm the fix worked
Verify installed package version meets or exceeds the fixed release; run regression tests with known SIXEL test vectors that previously triggered the dither crash.
Typical attack path
- Craft malicious SIXEL image exploiting dither.c use-after-free
- Deliver image via email, web, or file share
- Victim opens image in application using vulnerable libsixel
- Trigger memory reuse leading to code execution or crash
How to detect it
Review application crash logs for segmentation faults or heap errors during SIXEL decoding; inspect process memory dumps for patterns consistent with use-after-free in dither routines.
What your security team should do
- Apply the listed fixed package versions immediately
- Scan build pipelines and container images for libsixel 1.10.0
- Block or sandbox untrusted SIXEL image processing until patched
- Monitor vulnerability feeds for any new exploit releases
The record
libsixel 1.10.0 is vulnerable to Use after free in libsixel/src/dither.c:379.
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
- CVE-2022-29978 There is a floating point exception error in sixel_encoder_do_resize, encoder.c:633 in… Also affects libsixel
- CVE-2022-29977 There is an assertion failure error in stbi__jpeg_huff_decode, stb_image.h:1894 in… Also affects libsixel
- CVE-2021-40656 libsixel before 1.10 is vulnerable to Buffer Overflow in libsixel/src/quant.c:867. Also affects libsixel
- CVE-2022-27044 libsixel 1.8.6 is affected by Buffer Overflow in libsixel/src/quant.c:876. Also affects libsixel
- CVE-2022-27046 libsixel 1.8.6 suffers from a Heap Use After Free vulnerability in in… Also affects libsixel
- CVE-2021-46700 In libsixel 1.8.6, sixel_encoder_output_without_macro (called from… Also affects libsixel
- CVE-2021-45340 In Libsixel prior to and including v1.10.3, a NULL pointer dereference in the stb_image.h… Also affects libsixel
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort… CWE-416