CVE-2021-45340
Medium · 6.5CVSS
6.5
EPSS
0.9%
Published
Jan 25, 2022
CISA due date
—
Cloudanix analysis
A bug in an image processing tool can make programs crash when they try to open certain bad picture files sent by attackers.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A NULL pointer dereference in the stb_image.h component of libsixel allows remote attackers to trigger a denial of service through a specially crafted PICT file.
Why it matters to the business
Applications processing image files may crash unexpectedly when handling malicious PICT files, leading to service disruptions and potential loss of availability for users relying on image handling features. The issue has been public for over four years with low exploit likelihood and no known ransomware use.
How an attack unfolds
An attacker creates a malicious PICT file designed to trigger the NULL pointer dereference in the image processing library. When the vulnerable application opens or processes this file, it crashes due to the memory corruption, causing a denial of service. No authentication or special privileges are required beyond the ability to supply the crafted file.
How to fix it
Update to a fixed version of the affected component, specifically commit 177064d0aee4a331eef93e3667963c02f0b94333 or 0794478e4938d8193516ab49926e03cb068febe6 in the nodejs/node repository.
How to confirm the fix worked
Verify the installed version against the fixed commits listed for nodejs/node, and test processing of known malicious PICT files to ensure no crash occurs.
Typical attack path
- Craft a malicious PICT file exploiting the NULL dereference in stb_image.h
- Deliver the file to the target application via network upload, email, or local filesystem
- Induce the application to process the file using libsixel
- Trigger the dereference leading to application crash and denial of service
How to detect it
Look for application crashes or segmentation faults when processing PICT files in logs, monitor for high rates of failures in image parsing components.
What your security team should do
- Prioritize updating all instances of the library to the fixed commits
- Implement input validation or sandboxing for image processing workflows
- Monitor for unusual crashes in image handling services as a temporary detection measure
The record
In Libsixel prior to and including v1.10.3, a NULL pointer dereference in the stb_image.h component of libsixel allows attackers to cause a denial of service (DOS) via a crafted PICT 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-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-2026-112405 Pillow is a Python imaging library. CWE-476