# CVE-2025-9300: saitoha libsixel img2sixel encoder.c sixel_debug_print_palette stack-based overflow

> A stack-based buffer overflow in libsixel allows local attackers to execute arbitrary code or cause denial of service via crafted input.

- **Severity:** Medium 4.8 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Aug 2025
- **Updated:** 21 Aug 2025
- **Also known as:** DEBIAN-CVE-2025-9300, GHSA-m23p-3g32-h722, UBUNTU-CVE-2025-9300, openSUSE-SU-2025:15526-1

## What is CVE-2025-9300?

CVE-2025-9300 is a medium-severity memory corruption vulnerability in saitoha libsixel, published on 21 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability was found in saitoha libsixel up to 1.10.3. Affected by this issue is the function sixel_debug_print_palette of the file src/encoder.c of the component img2sixel. The manipulation results in stack-based buffer overflow. The attack must be initiated from a local position. The exploit has been made public and could be used. The patch is identified as 316c086e79d66b62c0c4bc66229ee894e4fdb7d1. Applying a patch is advised to resolve this issue.

Weakness: CWE-121 (Stack-based Buffer Overflow), CWE-787 (Out-of-bounds Write), CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2025-9300?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libsixel` | openSUSE:Tumbleweed | All versions | 1.10.5-2.1 |

Products: Saitoha Libsixel.

## How do I fix CVE-2025-9300?

Apply the vendor's patch.

## Is CVE-2025-9300 being exploited?

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

## Other vulnerabilities in saitoha libsixel

- [CVE-2019-19635](https://insights.sbomify.com/CVE-2019-19635/): Memory corruption in n/a (critical 9.8)
- [CVE-2019-19636](https://insights.sbomify.com/CVE-2019-19636/): Integer overflow in n/a (critical 9.8)
- [CVE-2019-19637](https://insights.sbomify.com/CVE-2019-19637/): Integer overflow in n/a (critical 9.8)
- [CVE-2019-19638](https://insights.sbomify.com/CVE-2019-19638/): Integer overflow in n/a (critical 9.8)
- [CVE-2022-27044](https://insights.sbomify.com/CVE-2022-27044/): Memory corruption in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-9300 and fix it if it is affected.

What it is: CVE-2025-9300 is a medium-severity memory corruption vulnerability in saitoha libsixel, published on 21 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-9300 exists.

Affected product: saitoha libsixel. 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-2025-9300/ (Markdown: https://insights.sbomify.com/CVE-2025-9300/index.md)
```

## Sources

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

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