Vulnerability · Published May 11, 2026 · Assigned by GitHub_M
CVE-2026-42046libcaca: Heap OOB write in canvas import functions caused by int overflow
High 7.8
In plain English
A high-severity heap buffer overflow in libcaca from cacalabs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
libcaca is a colour ASCII art library. In 0.99.beta20 and earlier, an integer overflow vulnerability in libcaca's canvas import functionality allows an attacker to cause a controlled heap out-of-bounds write (heap overflow) by supplying a crafted file in the "caca" format. Depending on the build configuration and memory allocator, this may lead to memory corruption or remote code execution. This is the same vulnerability as CVE-2021-3410 but the fix at that time was not fully correct. Commit fb77acff9ba6bb01d53940da34fb10f20b156a23 fixes this vulnerability.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | libcaca | 0.99.beta20-3+deb12u1 | DEBIAN-CVE-2026-42046 |
| Debian:13 | libcaca | 0.99.beta20-5+deb13u1 | DEBIAN-CVE-2026-42046 |
| Debian:14 | libcaca | 0.99.beta20-7 | DEBIAN-CVE-2026-42046 |
| Ubuntu:22.04:LTS | libcaca | 0.99.beta19-2.2ubuntu4.2 | USN-8318-1 |
| Ubuntu:22.04:LTS | libcaca | 0.99.beta19-2.2ubuntu4.2 | UBUNTU-CVE-2026-42046 |
| Ubuntu:24.04:LTS | libcaca | 0.99.beta20-4ubuntu0.2 | USN-8318-1 |
| Ubuntu:24.04:LTS | libcaca | 0.99.beta20-4ubuntu0.2 | UBUNTU-CVE-2026-42046 |
| Ubuntu:25.10 | libcaca | 0.99.beta20-5ubuntu0.25.10.2 | USN-8318-1 |
| Ubuntu:25.10 | libcaca | 0.99.beta20-5ubuntu0.25.10.2 | UBUNTU-CVE-2026-42046 |
| Ubuntu:26.04:LTS | libcaca | 0.99.beta20-6ubuntu2.1 | UBUNTU-CVE-2026-42046 |
| Ubuntu:26.04:LTS | libcaca | 0.99.beta20-6ubuntu2.1 | USN-8318-1 |
Affected products (as reported)
Weakness: CWE-122, CWE-190, CWE-787 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/cacalabs/libcaca/security/advisories/GHSA-4vvg-vrqv-m56w x_refsource_CONFIRM
- https://github.com/cacalabs/libcaca/issues/86 x_refsource_MISC
- https://github.com/cacalabs/libcaca/commit/fb77acff9ba6bb01d53940da34fb10f20b156a23 x_refsource_MISC