CVE-2025-64505: Critical Heap Buffer Overflow in libpng Leading to Denial of Service

platform/external/libpng Updated 04 Jun 2026

Summary

01/06/2026
Yes i
Critical
Not published

CVE-2025-64505: In png_init_read_transformations of pngrtran.c, there is a possible way to cause a persistent denial of service due to a heap buffer overflow. Affects platform/external/libpng across 5 version ranges.

>= 14:0, < 14:2026-06-01 >= 15:0, < 15:2026-06-01 >= 16:0, < 16:2026-06-01 >= 16-qpr2:0, < 16-qpr2:2026-06-01 >= 17-next:0, < 17-next:2026-06-01

Fixed in 17-next:2026-06-01. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libpng is a widely-used open-source library for handling PNG (Portable Network Graphics) image files. It provides functionalities for reading and writing PNG images, making it essential for applications that require image processing. The library is known for its efficiency and flexibility, but like any software, it can be vulnerable to security issues. The vulnerability in question arises from a heap buffer overflow in the png_init_read_transformations function, which can be exploited to cause a denial of service.

Vulnerability Detail

The vulnerability is a heap buffer overflow located in the png_init_read_transformations function of the pngrtran.c file. This flaw allows an attacker to manipulate the memory allocation process, potentially leading to a persistent denial of service. The exploitation of this vulnerability does not require any additional execution privileges or user interaction, making it particularly dangerous. If successfully exploited, it can crash the application using the library, leading to service interruptions.

How To Fix

Minimum fixed version

17-next:2026-06-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not feasible, consider implementing input validation to sanitize image data before processing. This can help mitigate the risk of exploitation until the library is updated. Additionally, monitor your application for unusual behavior that may indicate an attempted exploit.

Conclusion

The vulnerability CVE-2025-64505 in the libpng library poses a critical risk due to a heap buffer overflow that can lead to denial of service. It is crucial to update to the patched version as soon as possible to protect your applications. Utilize Vulert to monitor and check for vulnerabilities in your software.

See every vulnerability recorded for platform/external/libpng →

Share this vulnerability

FAQ

CVE-2025-64505 is a critical vulnerability in the libpng library that allows for a heap buffer overflow, potentially leading to a denial of service.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without requiring any signup.

Exploitation of this vulnerability can lead to a persistent denial of service, causing applications that rely on libpng to crash.

No, user interaction is not required for exploitation, making it a significant risk for applications using the affected library.

If you cannot update immediately, implement input validation on image data and monitor your application for unusual behavior to mitigate risks.

Related vulnerabilities

Recent vulnerabilities recorded for platform/external/libpng.

How To Fix

Minimum fixed version

17-next:2026-06-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback