CVE-2022-27046
High · 8.8CVSS
8.8
EPSS
1.0%
Published
Apr 8, 2022
CISA due date
—
Cloudanix analysis
A flaw in an image processing library could let attackers take over computers by sending specially made picture files.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Library
- Class
- Use After Free
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability is a heap use-after-free in libsixel/src/dither.c at line 388, which can lead to memory corruption when processing specially crafted SIXEL image data.
Why it matters to the business
Applications using this library to handle images may crash or allow remote code execution, potentially compromising systems that process untrusted graphics files across many downstream dependents.
How an attack unfolds
An attacker supplies a malicious SIXEL-encoded image file to an application linked against the vulnerable library. When the dithering function processes it, the use-after-free is triggered, allowing manipulation of freed memory for code execution.
How to fix it
Upgrade to a version of libsixel newer than 1.8.6 when a fix becomes available, or apply any vendor-supplied patches. Disable SIXEL image processing for untrusted inputs until mitigated.
How to confirm the fix worked
Verify the installed library version is not 1.8.6 and test image processing workflows with sample SIXEL files for absence of crashes or memory errors.
Typical attack path
- Craft malicious SIXEL image exploiting the UAF in dither.c
- Deliver image to target application via network or file
- Trigger processing of the image by the vulnerable library
- Achieve memory corruption and potential code execution
How to detect it
Monitor application logs and crash reports for anomalies during SIXEL image handling; examine memory dumps or sanitizer outputs for use-after-free patterns in dither processing.
What your security team should do
- Prioritize updating libsixel in all affected products due to public exploit availability
- Restrict or sandbox processing of SIXEL files from untrusted sources
- Review and inventory all applications depending on this library given its ecosystem prevalence
The record
libsixel 1.8.6 suffers from a Heap Use After Free vulnerability in in libsixel/src/dither.c:388.
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-2021-41715 libsixel 1.10.0 is vulnerable to Use after free in libsixel/src/dither.c:379. 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-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