# CVE-2026-42046: libcaca: Heap OOB write in canvas import functions caused by int overflow

> An integer overflow in libcaca's canvas import allows attackers to trigger a heap out-of-bounds write via crafted files, potentially leading to code execution.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 11 May 2026
- **Updated:** 12 May 2026
- **Also known as:** DEBIAN-CVE-2026-42046, ECHO-a932-eed9-9da1, GHSA-4vvg-vrqv-m56w, MGASA-2026-0171, SUSE-SU-2026:22175-1, SUSE-SU-2026:2394-1, SUSE-SU-2026:2423-1, SUSE-SU-2026:2424-1, UBUNTU-CVE-2026-42046, USN-8318-1, openSUSE-SU-2026:10834-1, openSUSE-SU-2026:21101-1

## What is CVE-2026-42046?

CVE-2026-42046 is a high-severity vulnerability in cacalabs libcaca, published on 11 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### 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.

Weakness: CWE-787 (Out-of-bounds Write), CWE-190 (Integer Overflow or Wraparound), CWE-122 (Heap-based Buffer Overflow)

## Which versions are affected by CVE-2026-42046?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libcaca` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 0.99.beta20-150600.3.3.1 |
| `libcaca` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 0.99.beta18-14.15.1 |
| `libcaca` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 0.99.beta20-150600.3.3.1 |
| `libcaca` | SUSE:Linux Enterprise Server 16.0 | All versions | 0.99.beta20-160000.3.1 |
| `libcaca` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 0.99.beta18-14.15.1 |
| `libcaca` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 0.99.beta19.git20171003-150200.11.12.1 |
| `libcaca` | SUSE:Linux Enterprise Server for SAP Applications 15 SP6 | All versions | 0.99.beta20-150600.3.3.1 |
| `libcaca` | SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.99.beta20-160000.3.1 |
| `libcaca` | openSUSE:Leap 16.0 | All versions | 0.99.beta20-160000.3.1 |
| `libcaca` | openSUSE:Tumbleweed | All versions | 0.99.beta20+git.1776622070.7c8e333-1.1 |

## How do I fix CVE-2026-42046?

Apply the vendor's patch.

## Is CVE-2026-42046 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42046 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42046 and fix it if it is affected.

What it is: CVE-2026-42046 is a high-severity vulnerability in cacalabs libcaca, published on 11 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42046 exists.

Affected product: cacalabs libcaca. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-42046/ (Markdown: https://insights.sbomify.com/CVE-2026-42046/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-42046
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-42046
- OSV: https://osv.dev/vulnerability/CVE-2026-42046

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-42046/
Summaries are generated and may contain mistakes; the official description above is the record.
