CVE-2004-0421: Medium severity libpng LIBPNG vulnerability

Published Apr 19, 2004
·
Updated

From: Steve G <linux4ever>

In the pngformatbuffer function located in pngerror.c around line 133 is the following code:

if (message == NULL) buffer[iout] = 0; else { buffer[iout++] = ':'; buffer[iout++] = ' '; pngmemcpy(buffer+iout, message, 64); buffer[iout+63] = 0; } This code is called from the pngchunkerror & pngchunkwarning functions. An example of their use would be in pngutil.c around line 119. pngchunkerror(pngptr, "CRC error"); In the above code, the message being constructed is only 10 characters long. The pngmemcpy function will unconditionally access 54 bytes beyond the message.

This could cause a carefully crafted png image to cause a denial of service.

Possibly embargoed; marking as embargoed until communicated otherwise.

Other sources

The Portable Network Graphics library (libpng) 1.0.15 and earlier allows attackers to cause a denial of service (crash) via a malformed PNG image file that triggers an error that causes an out-of-bounds read when creating the error message.

Affected Software

59 affected components
libpng LIBPNG=1.0.0
libpng LIBPNG=1.0.5
libpng LIBPNG=1.0.6
libpng LIBPNG=1.0.7
libpng LIBPNG=1.0.8
libpng LIBPNG=1.0.9
libpng LIBPNG=1.0.10
libpng LIBPNG=1.0.11
libpng LIBPNG=1.0.12
libpng LIBPNG=1.0.13
libpng LIBPNG=1.0.14
libpng LIBPNG=1.2.0
libpng LIBPNG=1.2.1
libpng LIBPNG=1.2.2
libpng LIBPNG=1.2.3
libpng LIBPNG=1.2.4
libpng LIBPNG=1.2.5
Openpkg Openpkg=1.3
Openpkg Openpkg=2.0
redhat Libpng=1.2.2-16
redhat Libpng=1.2.2-20
redhat Enterprise Linux=2.1
redhat Enterprise Linux=3.0
redhat Enterprise Linux Desktop=3.0
Trustix Secure Linux=2.0
Trustix Secure Linux=2.1
Greg Roelofs Libpng=1.0
Greg Roelofs Libpng=1.0.5
Greg Roelofs Libpng=1.0.6
Greg Roelofs Libpng=1.0.7
Greg Roelofs Libpng=1.0.8
Greg Roelofs Libpng=1.0.9
Greg Roelofs Libpng=1.0.10
Greg Roelofs Libpng=1.0.11
Greg Roelofs Libpng=1.0.12
Greg Roelofs Libpng=1.0.13
Greg Roelofs Libpng=1.0.14
Greg Roelofs Libpng3=1.2.0
Greg Roelofs Libpng3=1.2.1
Greg Roelofs Libpng3=1.2.2
Greg Roelofs Libpng3=1.2.3
Greg Roelofs Libpng3=1.2.4
Greg Roelofs Libpng3=1.2.5
redhat Libpng=1.2.2-16
redhat Libpng=1.2.2-16
redhat Libpng=1.2.2-20
redhat Libpng=1.2.2-20
redhat Libpng=10.1.0.13.8
redhat Libpng=10.1.0.13.8
redhat Libpng=10.1.0.13.11
redhat Libpng=10.1.0.13.11
redhat Enterprise Linux=2.1
redhat Enterprise Linux=2.1
redhat Enterprise Linux=2.1
redhat Enterprise Linux=3.0
redhat Enterprise Linux=3.0
redhat Enterprise Linux=3.0
redhat Linux Advanced Workstation=2.1
redhat Linux Advanced Workstation=2.1

Event History

Apr 19, 2004
Data Sourced
02:35 PM
DescriptionSeverityAffected Software
Apr 29, 2004
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
May 5, 2004
CVE Published
via MITRE·08:00 AM
Data Sourced
via MITRE·08:00 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2004-0421?

CVE-2004-0421 is classified as a high severity vulnerability due to potential information disclosure.

2

How do I fix CVE-2004-0421?

To remediate CVE-2004-0421, upgrade to a patched version of libpng or apply the recommended security fixes provided by your distribution.

3

What versions of libpng are affected by CVE-2004-0421?

CVE-2004-0421 affects libpng versions 1.0.0 through 1.2.5.

4

Can CVE-2004-0421 lead to code execution?

CVE-2004-0421 primarily poses a risk of information disclosure rather than direct code execution.

5

Is there a known exploit for CVE-2004-0421?

There are reports of exploit code being developed for CVE-2004-0421, thus it is advisable to take mitigation measures promptly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203