LibpngApplication

CVE-2026-22801

HIGH · 7.8 CVSS v3.1 Published 2026-01-12
Fix available
A fix is available. Upgrade to 1.6.54 or later.
See remediation →
80/100
Remediation priority · High
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. From 1.6.26 to 1.6.53, there is an integer truncation in the libpng simplified write API functions png_write_image_16bit and png_write_image_8bit causes heap buffer over-read when the caller provides a negative row stride (for bottom-up image layouts) or a stride exceeding 65535 bytes. The bug was introduced in libpng 1.6.26 (October 2016) by casts added to silence compiler warnings on 16-bit systems. This vulnerability is fixed in 1.6.54.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Integer truncation in libpng's png_write_image_16bit and png_write_image_8bit functions causes heap buffer over-read when processing images with negative row stride (bottom-up layouts) or stride values exceeding 65535 bytes. The vulnerability was introduced in version 1.6.26 by casts added to suppress 16-bit system compiler warnings.

MitigationUpgrade libpng to version 1.6.54 or later to remediate this vulnerability. Applications using these simplified write API functions should be tested with edge-case stride values to verify correct behavior.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
LibpngApplication
Affected:>= 1.6.26, < 1.6.54

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed libpng version
    Run `pkg-config --modversion libpng` or examine the libpng shared library file (e.g., `ls -la /usr/lib/libpng*` and `strings /usr/lib/libpng.so.x.x.X | grep "^libpng version"`)
    Affected if Version is 1.6.26 through 1.6.53 (anything >=1.6.26 and <1.6.54)
  2. Confirm vulnerable functions are used
    Search application source code for calls to `png_write_image_16bit` or `png_write_image_8bit` using grep: `grep -r "png_write_image_16bit\|png_write_image_8bit" *.c *.cpp`
    Affected if The application code calls either of these functions
  3. Check if application processes external images
    Review application logic to determine if it loads or processes PNG images from untrusted sources (user uploads, network input, or file-based input)
    Affected if The application processes PNG images from external or untrusted sources that could contain malicious stride values
  4. Determine image handling mode
    Inspect how the application configures row stride when calling png_write_image functions. Look for code paths that may pass negative values (bottom-up layouts) or values larger than 65535 bytes
    Affected if Application uses bottom-up image layouts or allows stride values exceeding 65535 bytes when writing PNG images

You are affected if your installed libpng version is between 1.6.26 and 1.6.53 AND your application uses png_write_image_16bit or png_write_image_8bit to process external PNG images with potentially problematic stride values.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.6.54 or later
Fixed in 1.6.54
Interim mitigation

Upgrade libpng to version 1.6.54 or later to remediate this vulnerability. Applications using these simplified write API functions should be tested with edge-case stride values to verify correct behavior.

Recommended fix High confidence

libpng 1.6.54

  1. 1. Identify all applications and systems that link against the vulnerable libpng library (versions 1.6.26 through 1.6.53).
  2. 2. Obtain libpng version 1.6.54 from the official source (https://github.com/glennrp/libpng/releases/tag/v1.6.54 or a trusted package repository).
  3. 3. Compile and install libpng 1.6.54 following standard build procedures (typically: ./configure, make, make install).
  4. 4. Rebuild any statically-linked applications against the new library.
  5. 5. Verify the installed version by running `png-config --version` or checking the library file directly.
  6. 6. Restart any running services that use libpng to ensure they load the updated library.
Caveat Minimal risk - version 1.6.54 is a bugfix release focused on security corrections; backward API compatibility is maintained.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Libpng Scoped from the published advisory
  • Consultation4.0 h
  • Implementation4.0 h
  • Testing8.0 h
  • Review / QA4.0 h
20.0 hours of engineering $3,440
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-22801 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-22801 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data