Description
The png_set_text_2 function in pngset.c in libpng 1.0.x before 1.0.59, 1.2.x before 1.2.49, 1.4.x before 1.4.11, and 1.5.x before 1.5.10 allows remote attackers to cause a denial of service (crash) or execute arbitrary code via a crafted text chunk in a PNG image file, which triggers a memory allocation failure that is not properly handled, leading to a heap-based buffer overflow.
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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 6.0 | libpng | 1.2.44-1+squeeze4 | DSA-2446-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | libpng +2 | 2:1.2.49-1.el6_2 | RHSA-2012:0523 |
| RHEL 5 | libpng +1 | 2:1.2.10-17.el5_8 | RHSA-2012:0523 |
Advisories 2
- RHSA-2012:0523 Red Hat Security Advisory: libpng security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-2446-1 libpng - incorrect memory handling Debian Security (DSA / DLA) · Mar 9, 2026
References
- 49660 third-party-advisory
- 48983 third-party-advisory
- RHSA-2012:0523 vendor-advisory
- libpng-pngsettext2-code-execution(74494) vdb-entry
- APPLE-SA-2012-09-19-1 vendor-advisory
- http://support.apple.com/kb/HT5503
- 52830 vdb-entry
- http://www.libpng.org/pub/png/src/libpng-1.5.10-README.txt
- DSA-2446 vendor-advisory
- GLSA-201206-15 vendor-advisory
- MDVSA-2012:046 vendor-advisory
- 48587 third-party-advisory
- http://www.libpng.org/pub/png/libpng.html
- 80822 vdb-entry
- FEDORA-2012-5526 vendor-advisory
- 48644 third-party-advisory
- FEDORA-2012-5079 vendor-advisory
- APPLE-SA-2012-09-19-2 vendor-advisory
- http://support.apple.com/kb/HT5501
- FEDORA-2012-5515 vendor-advisory
- FEDORA-2012-5080 vendor-advisory
- 1026879 vdb-entry
- FEDORA-2012-5518 vendor-advisory
- 48665 third-party-advisory
- FEDORA-2012-4902 vendor-advisory
- 48721 third-party-advisory
- USN-1417-1 vendor-advisory