# CVE-2026-40930: LIBPNG: Chunk smuggling in push-mode APNG parser via unconsumed chunk body

> Attackers can exploit a chunk smuggling flaw in the APNG parser to cause memory corruption or crashes by sending malicious PNG files.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L`)
- **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:** 4 Jun 2026
- **Updated:** 4 Jun 2026
- **Also known as:** ALPINE-CVE-2026-40930, AZL-89501, AZL-89504, AZL-89507, AZL-89513, AZL-89516, BELL-CVE-2026-40930, CLSA-2026-1788344031, DEBIAN-CVE-2026-40930, GHSA-c4v6-gxrq-6g2x, MGASA-2026-0205, OESA-2026-2533, OESA-2026-2534, OESA-2026-2535, RHSA-2026:20356, ROOT-OS-DEBIAN-11-CVE-2026-40930, UBUNTU-CVE-2026-40930

## What is CVE-2026-40930?

CVE-2026-40930 is a medium-severity vulnerability in pnggroup libpng, published on 4 Jun 2026. 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 process PNG (Portable Network Graphics) raster image files. In version 1.8.0, three inter-frame chunk discard paths in the push-mode APNG parser clear the chunk-header flag without consuming the chunk body and CRC, allowing attacker-controlled bytes inside an ignored ancillary chunk to be reinterpreted as a fresh chunk header on the next call to `png_process_data`. Commit faf06924688b62d7c1654b5ceddedbde66ffadb4 fixes the issue.

Weakness: CWE-436 (Interpretation Conflict)

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpng` | Red Hat:hummingbird:1 | All versions | 0:1.6.58-1.hum1 |
| `libpng-devel` | Red Hat:hummingbird:1 | All versions | 0:1.6.58-1.hum1 |
| `libpng-static` | Red Hat:hummingbird:1 | All versions | 0:1.6.58-1.hum1 |
| `libpng-tools` | Red Hat:hummingbird:1 | All versions | 0:1.6.58-1.hum1 |

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

Apply the vendor's patch.

## Is CVE-2026-40930 being exploited?

There is no known exploitation of CVE-2026-40930 in the wild and no public exploit code.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-40930 is a medium-severity vulnerability in pnggroup libpng, published on 4 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-40930 in the wild and no public exploit code.

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

## Sources

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

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