Description
Multiple buffer overflows in libpng 1.2.5 and earlier, as used in multiple products, allow remote attackers to execute arbitrary code via malformed PNG images in which (1) the png_handle_tRNS function does not properly validate the length of transparency chunk (tRNS) data, or the (2) png_handle_sBIT or (3) png_handle_hIST functions do not perform sufficient bounds checking.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 3 | libpng +1 | 2:1.2.2-25 | RHSA-2004:402 |
| RHEL 3 | libpng10 +1 | 1.0.13-15 | RHSA-2004:402 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 3
- Microsoft MSN Messenger 6.2.0137 - '.png' Remote Buffer Overflow EDB-25094 · remote · Feb 8, 2005 · verified
- LibPNG 1.2.5 - 'png_jmpbuf()' Local Buffer Overflow EDB-393 · local · Aug 13, 2004 · verified
- LibPNG Graphics Library - Remote Buffer Overflow EDB-389 · remote · Aug 11, 2004 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- RHSA-2004:402 Red Hat Security Advisory: libpng security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-536 libpng - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- 2004-0040 vendor-advisory
- 200663 vendor-advisory
- oval:org.mitre.oval:def:2274 vdb-entry signature
- http://www.mozilla.org/projects/security/known-vulnerabilities.html
- RHSA-2004:421 vendor-advisory
- RHSA-2004:402 vendor-advisory
- GLSA-200408-22 vendor-advisory
- 22958 third-party-advisory
- http://sunsolve.sun.com/search/document.do?assetkey=urn:cds:docid:1-21-114816-02-1
- FLSA:2089 vendor-advisory
- FLSA:1943 vendor-advisory
- oval:org.mitre.oval:def:594 vdb-entry signature
- TA05-039A third-party-advisory
- libpng-pnghandle-bo(16894) vdb-entry
- SCOSA-2004.16 vendor-advisory
- http://scary.beasts.org/security/CESA-2004-001.txt
- RHSA-2004:429 vendor-advisory
- oval:org.mitre.oval:def:2378 vdb-entry signature
- 15495 vdb-entry
- DSA-536 vendor-advisory
- VU#388984 third-party-advisory
- APPLE-SA-2004-09-09 vendor-advisory
- VU#817368 third-party-advisory
- 20040804 [OpenPKG-SA-2004.035] OpenPKG Security Advisory (png) mailing-list
- oval:org.mitre.oval:def:4492 vdb-entry signature
- SSRT4778 vendor-advisory
- MS05-009 vendor-advisory
- MDKSA-2006:213 vendor-advisory
- TA04-217A third-party-advisory
- http://www.adobe.com/support/downloads/detail.jsp?ftpID=2679
- oval:org.mitre.oval:def:7709 vdb-entry signature
- MDKSA-2006:212 vendor-advisory
- 20050209 MSN Messenger PNG Image Buffer Overflow Download Shellcoded Exploit mailing-list
- http://www.coresecurity.com/common/showdoc.php?idx=421&idxseccion=10
- CLA-2004:856 vendor-advisory
- 10857 vdb-entry
- SUSE-SA:2004:023 vendor-advisory
- GLSA-200408-03 vendor-advisory
- oval:org.mitre.oval:def:11284 vdb-entry signature
- MDKSA-2004:079 vendor-advisory
- 22957 third-party-advisory