# CVE-2026-33021: libsixel: Use-after-free in sixel_encoder_encode_bytes()

- Severity: High 7.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-14T21:57:22.817Z
- Modified: 2026-07-25T11:10:00.100Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

libsixel is a SIXEL encoder/decoder implementation derived from kmiya's sixel. Versions 1.8.7 and prior contain a use-after-free vulnerability in sixel_encoder_encode_bytes() because sixel_frame_init() stores the caller-owned pixel buffer pointer directly in frame->pixels without making a defensive copy. When a resize operation is triggered, sixel_frame_convert_to_rgb888() unconditionally frees this caller-owned buffer and replaces it with a new internal allocation, leaving the caller with a dangling pointer. Any subsequent access to the original buffer by the caller constitutes a use-after-free, confirmed by AddressSanitizer. An attacker who controls incoming frames can trigger this bug repeatedly and predictably, resulting in a reliable crash with potential for code execution. This issue has been fixed in version 1.8.7-r1.

(As written by CVE List.)

## Affected

- saitoha libsixel: < 1.8.7-r1; before 1.8.7-r1

## References

- <https://github.com/saitoha/libsixel/security/advisories/GHSA-j6m5-2cc7-3whc> (exploit, vendor-advisory)
- <https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1> (release-notes)

## Sources

- CVE List: [CVE-2026-33021](https://www.cve.org/CVERecord?id=CVE-2026-33021), CVE Terms of Use, modified 2026-04-16
- NVD: [CVE-2026-33021](https://nvd.nist.gov/vuln/detail/CVE-2026-33021), Public domain, modified 2026-07-25

---

Page: https://cve.day/CVE-2026-33021 · Whole record: https://cve.day/CVE-2026-33021.json · Rebuilt by cve.day 2026-11-25T22:59:18.802Z
