{"id":"CVE-2026-33021","aliases":["DEBIAN-CVE-2026-33021","EUVD-2026-22746","GHSA-j6m5-2cc7-3whc","UBUNTU-CVE-2026-33021"],"status":"published","title":"libsixel: Use-after-free in sixel_encoder_encode_bytes()","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-\u003epixels 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.","severity":{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00252,"percentile":0.16783,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2026-04-14T21:57:22Z","modified":"2026-10-28T02:30:34Z","fixes":[{"ecosystem":"Debian:14","package":"libsixel","fixed_in":["1:1.8.7-r2-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.3-3","1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Debian:13","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Debian:14","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1:1.8.7-r2-1"}]}],"versions":["1.10.5-1","1:1.8.7-1","1:1.8.7-2","1:1.8.7-3","1:1.8.7-4","1:1.8.7-5","1:1.8.7-6"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.4.2-1","1.5.2-2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.2-2","1.7.3-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.2-1","1.8.2-2.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.6-2","1.10.3-2","1.10.3-3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.3-3","1.10.3-3build1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1build1","1:1.8.7-r2-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"libsixel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.10.5-1","1.10.5-1build1"]}],"products":[{"vendor":"saitoha","product":"libsixel"}],"references":[{"url":"https://github.com/saitoha/libsixel/security/advisories/GHSA-j6m5-2cc7-3whc","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","report"]},{"url":"https://github.com/saitoha/libsixel/releases/tag/v1.8.7-r1","tags":["x_refsource_MISC","Release Notes","web","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33021.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33021","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-33021","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-33021","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-33021","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-33021","title":"libsixel: Use-after-free in sixel_encoder_encode_bytes()","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-\u003epixels 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.","status":"published","published":"2026-04-14T21:57:22.817Z","modified":"2026-04-16T13:54:36.177Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:20:08.009733Z"}],"euvd":[{"id":"EUVD-2026-22746","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-\u003epixels 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.","status":"published","published":"2026-04-14T21:57:22Z","modified":"2026-04-16T13:54:36Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high"}],"updated_at":"2026-11-02T19:24:24.386229Z"}],"nvd":[{"id":"CVE-2026-33021","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-\u003epixels 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.","status":"published","published":"2026-04-14T23:16:27.66Z","modified":"2026-07-25T11:10:00.1Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:12:14.748836Z"}],"osv":[{"id":"CVE-2026-33021","title":"libsixel: Use-after-free in sixel_encoder_encode_bytes()","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-\u003epixels 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.","status":"published","published":"2026-04-14T21:57:22.817Z","modified":"2026-10-28T02:30:34.51957266Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:45:01.548715Z"},{"id":"DEBIAN-CVE-2026-33021","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-\u003epixels 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.","status":"published","published":"2026-04-14T23:16:27.66Z","modified":"2026-10-01T03:03:10.278665572Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:54.587575Z"},{"id":"UBUNTU-CVE-2026-33021","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-\u003epixels 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.","status":"published","published":"2026-04-14T23:16:00Z","modified":"2026-10-17T12:59:58.743740061Z","cvss":[{"version":"3.1","score":7.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","level":"high"}],"updated_at":"2026-11-02T16:56:16.036833Z"}]}}
