CVE-2026-33021: Use-after-free in libsixel sixel_encoder_encode_bytes()
- Vendor
- Saitoha
CVE-2026-33021 is a use-after-free vulnerability in libsixel affecting version 1.8.7 and earlier. The flaw is in the encoder path, specifically sixel_encoder_encode_bytes(), due to unsafe ownership handling of the pixel buffer. During initialization, sixel_frame_init() stores a caller-supplied pixel buffer pointer directly in frame->pixels instead of making a defensive copy or otherwise preserving clear ownership semantics. If a resize operation occurs later, sixel_frame_convert_to_rgb888() unconditionally frees that buffer and replaces it with a newly allocated internal buffer. Because the original allocation is still assumed by the caller to remain valid, subsequent caller access to the original pixel buffer dereferences freed memory. The issue was confirmed with AddressSanitizer. According to the provided content, an attacker able to control incoming frames can trigger the condition repeatedly and predictably, causing a reliable crash and potentially enabling code execution.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can cause a reliable application crash through dereference of a dangling pointer. Because the bug involves a use-after-free on attacker-influenced frame processing, it may also permit memory corruption with potential arbitrary code execution, depending on allocator behavior, process memory layout, and surrounding exploitability conditions. At minimum, this is a denial-of-service condition in applications using vulnerable libsixel encoder functionality on attacker-controlled image/frame data.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, avoid passing attacker-controlled or untrusted frame data into vulnerable libsixel encoding paths, especially workflows that may trigger resize or RGB888 conversion operations. Isolate processes that use libsixel, enable memory-safety diagnostics in testing, and reduce exposure of services or applications that encode untrusted image/frame content until the fixed release can be deployed. These are temporary mitigations only; patching is required to fully address the flaw.
Remediation
Patch, then assume compromise.
Upgrade libsixel to version 1.8.7-r1 or later, where the issue is fixed. The underlying remediation is to correct buffer ownership handling so that caller-owned pixel buffers are not freed by internal conversion logic without an explicit transfer of ownership, such as by making a defensive copy or enforcing consistent lifetime management.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2026-33021 exploited in the wild?
- Yes. As of Sep 25, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2026-33021?
- Yes. As of Sep 25, 2026, Mallory has reports of a public exploit for CVE-2026-33021.
- Is there a patch for CVE-2026-33021?
- Upgrade libsixel to version 1.8.7-r1 or later, where the issue is fixed. The underlying remediation is to correct buffer ownership handling so that caller-owned pixel buffers are not freed by internal conversion logic without an explicit transfer of ownership, such as by making a defensive copy or enforcing consistent lifetime management.
- What products are affected by CVE-2026-33021?
- Saitoha Libsixel.
- How severe is CVE-2026-33021?
- CVE-2026-33021 has a CVSS v3.1 score of 7.3 (High) and an EPSS score of 0.25% (17th percentile) as of Sep 25, 2026.
Recent activity
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.