# CVE-2025-66293: LIBPNG has an out-of-bounds read in png_image_read_composite

> An out-of-bounds read in libpng allows attackers to read memory beyond buffer limits when processing valid PNG images with transparency and gamma correction.

- **Severity:** High 7.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 3 Dec 2025
- **Updated:** 4 Dec 2025
- **Also known as:** ALPINE-CVE-2025-66293, AZL-71246, AZL-71455, AZL-71458, AZL-71461, AZL-71464, AZL-71467, AZL-71470, AZL-71485, AZL-71488, AZL-71491, AZL-71494, AZL-71497, AZL-71644, BELL-CVE-2025-66293, CLSA-2026-1768212418, DEBIAN-CVE-2025-66293, ECHO-91c2-e6d0-2b32, GHSA-9mpm-9pxh-mg4f, JLSEC-2026-6, MGASA-2025-0323, MINI-x659-r72g-8hc3, OESA-2026-1124, OESA-2026-1125, OESA-2026-1126, OESA-2026-1127, OESA-2026-1128, OESA-2026-1129, ROOT-OS-ALPINE-315-CVE-2025-66293, SUSE-SU-2026:0085-1, UBUNTU-CVE-2025-66293, openSUSE-SU-2025:15801-1

## What is CVE-2025-66293?

CVE-2025-66293 is a high-severity vulnerability in Libpng Libpng, published on 3 Dec 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. Prior to 1.6.52, an out-of-bounds read vulnerability in libpng's simplified API allows reading up to 1012 bytes beyond the png_sRGB_base[512] array when processing valid palette PNG images with partial transparency and gamma correction. The PNG files that trigger this vulnerability are valid per the PNG specification; the bug is in libpng's internal state management. Upgrade to libpng 1.6.52 or later.

Weakness: CWE-125 (Out-of-bounds Read)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpng16` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 1.6.8-15.12.1 |
| `libpng16` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 1.6.8-15.12.1 |
| `libpng16` | openSUSE:Tumbleweed | All versions | 1.6.52-1.1 |

Products: Libpng Libpng.

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

Upgrade to a fixed version.

## Is CVE-2025-66293 being exploited?

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

## Other vulnerabilities in Libpng Libpng

- [CVE-2017-12652](https://insights.sbomify.com/CVE-2017-12652/): Denial of service in n/a (critical 9.8)
- [CVE-2018-14550](https://insights.sbomify.com/CVE-2018-14550/): Out-of-bounds write in libpng (high 8.8)
- [CVE-2026-25646](https://insights.sbomify.com/CVE-2026-25646/): LIBPNG has a heap buffer overflow in png_set_quantize (high 8.3)
- [CVE-2026-33636](https://insights.sbomify.com/CVE-2026-33636/): LIBPNG has ARM NEON Palette Expansion Out-of-Bounds Read on AArch64 (high 7.6)
- [CVE-2026-33416](https://insights.sbomify.com/CVE-2026-33416/): LIBPNG has use-after-free via pointer aliasing in `png_set_tRNS` and `png_set_PLTE` (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-66293 is a high-severity vulnerability in Libpng Libpng, published on 3 Dec 2025. An attacker can exploit it over the internet without logging in, 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-2025-66293 exists.

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

## Sources

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

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