Tetrak
GitHub ↗
Security · libpng

libpng's simplified 8-bit write over-reads its row buffer

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

Advisory
CVE-2025-64506
Library
libpng, libpng1.6 on Debian
Published
Severity
6.1 out of 10, as published
Affected
libpng 1.6.0 to before 1.6.51
Fixed in
1.6.51
Reaches you
on a save path

What triggers it

Writing an 8-bit image through libpng's simplified write API with convert_to_8bit set.

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 png_write_image_8bit.

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.51.

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

The general advice applies to every row here.

Sources