Cloudanix VulnDB

CVE-2022-29977

Medium · 6.5

CVSS

6.5

EPSS

1.0%

Published

May 11, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

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.

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

  1. Generate a specially crafted JPEG that fails the stbi__jpeg_huff_decode assertion
  2. Deliver the file via email, web upload, or shared storage to a system running img2sixel
  3. Trigger automatic or user-initiated conversion of the JPEG
  4. 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