Tetrak
GitHub ↗
Security · libpng

libpng's simplified write truncates a row stride and over-reads

LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files.

Advisory
CVE-2026-22801
Library
libpng, libpng1.6 on Debian
Published
Severity
7.8 out of 10, as published
Affected
libpng 1.6.26 to 1.6.53
Fixed in
1.6.54
Reaches you
on a save path

What triggers it

Writing an image through png_write_image_16bit or png_write_image_8bit with a negative or over-large row stride.

What sillybos does

Not reached by opening a file

Opening or reading a file never reaches this flaw, so a check before decoding has nothing to refuse. Listed so that nobody expects it to.

On the write path only; reading a PNG never runs the simplified write functions.

Proposed from the advisory's text on 2026-11-01, as part of folding the backfill into the record; confirmed by a person on 2026-11-03.

How to protect yourself

In general. Upgrade to libpng 1.6.54.

Specifically. Not a pre-decode matter: the flaw is on a save path.

The general advice applies to every row here.

Sources