Critical Security Flaws in libpng: Buffer Overflows and Out-of-Bounds Read
Summary
ALSA-2026:0238: Important: libpng security update. Affects libpng versions < 2:1.6.37-12.el9_7.1. Fixed in 2:1.6.37-12.el9_7.1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
libpng is a widely used library for creating and manipulating Portable Network Graphics (PNG) image files. It provides essential functions for handling PNG images, making it a critical component in various applications that require image processing. The library's popularity stems from its efficiency and robust feature set, but it has recently been found vulnerable to several security issues that could compromise the integrity and security of applications relying on it.
Vulnerability Detail
The vulnerabilities in libpng include a buffer overflow (CVE-2025-64720), a heap buffer overflow (CVE-2025-65018), and an out-of-bounds read in the png_image_read_composite function (CVE-2025-66293). These vulnerabilities can lead to arbitrary code execution, data corruption, or denial of service, posing significant risks to applications that utilize this library. Attackers could exploit these flaws to manipulate PNG files, potentially leading to severe consequences for affected systems.
How To Fix
Minimum fixed version
2:1.6.37-12.el9_7.1
This is the first release that contains the fix.
sudo dnf update libpng
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, if updating the package is not immediately possible, consider restricting the use of libpng in applications that handle untrusted PNG files. This can help mitigate the risk until a proper update is applied.
Conclusion
The vulnerabilities identified in libpng pose significant risks to applications that utilize this library for image processing. It is crucial to update to the latest patched version to mitigate these risks. Users are encouraged to monitor their applications for vulnerabilities using tools like Vulert to ensure ongoing security.
See every vulnerability recorded for libpng →
FAQ
libpng is a library used for handling PNG image files, providing functions for creating and manipulating these images.
The vulnerabilities include buffer overflows and an out-of-bounds read, which can lead to code execution and data corruption.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
As a workaround, restrict the use of libpng in applications that handle untrusted PNG files until you can apply the update.
For detailed information, refer to the CVE pages: CVE-2025-64720, CVE-2025-65018, and CVE-2025-66293.
Related vulnerabilities
Recent vulnerabilities recorded for libpng.