CVE-2022-29977
Medium · 6.5CVSS
6.5
EPSS
1.0%
Published
May 11, 2022
CISA due date
—
Cloudanix analysis
A bug in an image conversion tool lets attackers crash the program by sending one specially made picture file, stopping any service that relies on that tool until it is restarted.
- 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
Assertion failure in stbi__jpeg_huff_decode within stb_image.h causes the img2sixel process to terminate when parsing a malformed JPEG image, resulting in denial of service.
Why it matters to the business
Applications or services that convert or display JPEG files using the affected library can be forced offline by a single malicious image, interrupting workflows that rely on image processing and increasing operational recovery effort.
How an attack unfolds
An attacker creates a JPEG file that triggers the assertion failure during Huffman decoding, then delivers the file to a target system where img2sixel or dependent tools automatically process it, causing an immediate crash without requiring authentication or elevated privileges.
How to fix it
Replace or upgrade the libsixel package to a version that resolves the assertion failure in stb_image handling; if no updated package is available, isolate or disable img2sixel processing of untrusted JPEG input and consider alternative image conversion tools.
How to confirm the fix worked
Test the updated or alternative tool against a set of known-malformed JPEG files that previously triggered the assertion; confirm the process no longer crashes and that image conversion succeeds for valid files.
Typical attack path
- Generate a specially crafted JPEG that fails the stbi__jpeg_huff_decode assertion
- Deliver the file via email, web upload, or shared storage to a system running img2sixel
- Trigger automatic or user-initiated conversion of the JPEG
- Process terminates with assertion failure, denying service
How to detect it
Review application and system logs for abrupt termination of img2sixel or processes linked to stb_image when JPEG files are processed; correlate crash timestamps with recent file ingestion events.
- img2sixel
- stbi__jpeg_huff_decode
- assertion failure
What your security team should do
- Inventory all systems and containers using libsixel or img2sixel and prioritize replacement
- Block or sanitize untrusted JPEG uploads in any workflow that invokes img2sixel
- Monitor for process crashes correlated with JPEG processing until remediation is complete
The record
There is an assertion failure error in stbi__jpeg_huff_decode, stb_image.h:1894 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-29978 There is a floating point exception error in sixel_encoder_do_resize, encoder.c:633 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-105754 vLLM is an inference and serving engine for large language models. CWE-617