CVE-2025-65018: Critical Remote Code Execution Vulnerability in libpng

platform/external/libpng Updated 04 Jun 2026

Summary

01/06/2026
Yes i
Critical
Not published

CVE-2025-65018: In multiple locations, there is a possible way to achieve remote code execution 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

libpng is a widely used open-source library for handling PNG (Portable Network Graphics) image files. It provides essential functionality for reading and writing PNG images, making it a critical component in various applications and systems that require image processing. The library is known for its efficiency and flexibility, but like any software, it can be susceptible to vulnerabilities that may compromise the security of applications that rely on it.

Vulnerability Detail

The vulnerability identified as CVE-2025-65018 is a critical remote code execution flaw caused by a heap buffer overflow in multiple locations within the libpng library. This issue allows attackers to exploit the vulnerability without requiring user interaction, leading to potential remote escalation of privileges. The flaw can be triggered by specially crafted PNG files, which may allow an attacker to execute arbitrary code on the affected system, posing significant risks to data integrity and system security.

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 PNG files before processing them. This can help mitigate the risk of exploitation by rejecting malformed or suspicious files.

Conclusion

The CVE-2025-65018 vulnerability in the libpng library poses a critical risk due to its potential for remote code execution. It is crucial for developers and organizations to update their libpng versions to the patched releases to safeguard their applications. Additionally, utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for platform/external/libpng →

Share this vulnerability

FAQ

CVE-2025-65018 is a critical vulnerability in the libpng library that allows remote code execution due to a heap buffer overflow.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your gradle.lockfile for vulnerabilities without requiring signup.

The vulnerability can lead to remote code execution, allowing attackers to gain unauthorized access and control over affected systems.

No, user interaction is not needed for exploitation, making it particularly dangerous.

Implement input validation to sanitize PNG files before processing them as a temporary workaround.

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