p PatchFirst

CVE-2025-64505

CVE-2025-64505 · LIBPNG is vulnerable to a heap buffer overflow in `png_do_quantize` via malformed palette index

This page contains facts from public vulnerability sources. Check the original advisory before updating.

LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. Prior to version 1.6.51, a heap buffer over-read vulnerability exists in libpng's png_do_quantize function when processing PNG files with malformed palette indices. The vulnerability occurs when palette_lookup array bounds are not validated against externally-supplied image data, allowing an attacker to craft a PNG file with out-of-range palette indices that trigger out-of-bounds memory access. This issue has been patched in version 1.6.51.

CVSS 6.1 · Medium · EPSS 0.2% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • libpng

    Versions
    • < 1.6.51: Affected

    No fix published

  • libpng1.6 Debian:12

    Versions
    • 1.6.39-2
    Affected ranges
    • ECOSYSTEM: < 1.6.39-2+deb12u1

    Update to 1.6.39-2+deb12u1

  • libpng1.6 Debian:13

    Versions
    • 1.6.48-1
    Affected ranges
    • ECOSYSTEM: < 1.6.48-1+deb13u1

    Update to 1.6.48-1+deb13u1

  • libpng1.6 Debian:14

    Versions
    • 1.6.48-1
    • 1.6.49-1~exp1
    • 1.6.50-1
    • 1.6.50-1~exp1
    Affected ranges
    • ECOSYSTEM: < 1.6.51-1

    Update to 1.6.51-1

  • libpng Ubuntu:Pro:14.04:LTS

    Versions
    • 1.2.49-4ubuntu1
    • 1.2.49-5ubuntu1
    • 1.2.50-1ubuntu1
    • 1.2.50-1ubuntu2
    • 1.2.50-1ubuntu2.14.04.1
    • 1.2.50-1ubuntu2.14.04.2
    • 1.2.50-1ubuntu2.14.04.3
    Affected ranges
    • ECOSYSTEM: < 1.2.50-1ubuntu2.14.04.3+esm1

    Update to 1.2.50-1ubuntu2.14.04.3+esm1

  • libpng Ubuntu:Pro:16.04:LTS

    Versions
    • 1.2.51-0ubuntu3
    • 1.2.54-1
    • 1.2.54-1ubuntu1
    • 1.2.54-1ubuntu1.1
    • 1.2.54-1ubuntu1.1+esm1
    Affected ranges
    • ECOSYSTEM: < 1.2.54-1ubuntu1.1+esm2

    Update to 1.2.54-1ubuntu1.1+esm2

  • libpng1.6 Ubuntu:Pro:16.04:LTS

    Versions
    • 1.6.20-2
    • 1.6.20-2ubuntu0.1~esm1
    Affected ranges
    • ECOSYSTEM: < 1.6.20-2ubuntu0.1~esm2

    Update to 1.6.20-2ubuntu0.1~esm2

  • libpng1.6 Ubuntu:Pro:18.04:LTS

    Versions
    • 1.6.34-1
    • 1.6.34-1ubuntu0.18.04.1
    • 1.6.34-1ubuntu0.18.04.2
    Affected ranges
    • ECOSYSTEM: < 1.6.34-1ubuntu0.18.04.2+esm1

    Update to 1.6.34-1ubuntu0.18.04.2+esm1

  • libpng1.6 Ubuntu:Pro:20.04:LTS

    Versions
    • 1.6.37-1
    • 1.6.37-2
    Affected ranges
    • ECOSYSTEM: < 1.6.37-2ubuntu0.1~esm1

    Update to 1.6.37-2ubuntu0.1~esm1

  • libpng1.6 Ubuntu:22.04:LTS

    Versions
    • 1.6.37-3build4
    • 1.6.37-3build5
    Affected ranges
    • ECOSYSTEM: < 1.6.37-3ubuntu0.1

    Update to 1.6.37-3ubuntu0.1

  • libpng1.6 Ubuntu:24.04:LTS

    Versions
    • 1.6.40-1
    • 1.6.40-2
    • 1.6.40-3
    • 1.6.42-1
    • 1.6.43-1
    • 1.6.43-3
    • 1.6.43-5build1
    Affected ranges
    • ECOSYSTEM: < 1.6.43-5ubuntu0.1

    Update to 1.6.43-5ubuntu0.1

  • libpng1.6 Ubuntu:25.10

    Versions
    • 1.6.47-1.1
    • 1.6.48-1
    • 1.6.49-1~exp1
    • 1.6.50-1~exp1
    • 1.6.50-1
    Affected ranges
    • ECOSYSTEM: < 1.6.50-1ubuntu0.1

    Update to 1.6.50-1ubuntu0.1

Original sources

Check your server →