CVE-2022-29978
Medium · 6.5CVSS
6.5
EPSS
1.0%
Published
May 11, 2022
CISA due date
—
Cloudanix analysis
A tool that turns pictures into a special text format can suddenly stop working if someone sends it a bad picture file, halting any service that needs to convert those pictures.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A floating point exception occurs in sixel_encoder_do_resize (encoder.c:633) when libsixel processes a malformed JPEG, causing the img2sixel process to terminate abnormally.
Why it matters to the business
Image conversion or viewing services that rely on libsixel become unavailable when they encounter a malicious image file, interrupting workflows that depend on sixel output generation.
How an attack unfolds
An attacker creates a specially crafted JPEG that triggers an unhandled floating-point error inside the resize routine; when a victim application invokes img2sixel or an equivalent sixel encoder on the file, the process crashes and service is denied.
How to fix it
Upgrade to a patched version of libsixel once released; until then, isolate or disable img2sixel processing of untrusted JPEG files and apply input sanitization or sandboxing around the converter.
How to confirm the fix worked
Confirm the installed libsixel version is newer than 1.8.6; test conversion of the original proof-of-concept JPEG and verify the process no longer terminates with a floating-point exception.
Typical attack path
- Craft a JPEG file that causes division-by-zero or invalid floating-point operation in sixel_encoder_do_resize
- Deliver the file to a target system or service that uses libsixel 1.8.6 for image-to-sixel conversion
- Trigger conversion via command-line tool, library API call, or automated pipeline
- Observe process termination and denial of service
How to detect it
Review application and system logs for abrupt termination of img2sixel or processes linking against libsixel, especially entries containing floating-point exception, SIGFPE, or stack traces referencing sixel_encoder_do_resize.
- sixel_encoder_do_resize
- encoder.c:633
- Floating point exception
- img2sixel
What your security team should do
- Inventory all systems and containers using libsixel or the img2sixel binary
- Block or filter untrusted JPEG inputs to sixel conversion paths until an update is available
- Monitor process crash logs for floating-point exceptions originating from encoder.c
- Plan upgrade to the next stable libsixel release as soon as it is published
The record
There is a floating point exception error in sixel_encoder_do_resize, encoder.c:633 in libsixel img2sixel 1.8.6. Remote attackers could leverage this vulnerability to cause a denial-of-service via a crafted JPEG file.
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
- 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-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-53670 PREVAIL is a Polynomial-Runtime EBPF Verifier using an Abstract Interpretation Layer. CWE-682