CVE-2026-103025: bep/imagemeta Unbounded Memory Allocation Decoding PNG Vulnerability

HIGH
Advisory Identifier: GHSA-7hvw-3c2q-45qg
CWE-409 CWE-789
Published
Advisory Summary

CVE-2026-103025 is a HIGH unbounded memory allocation decoding png vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting bep/imagemeta libraries in the Go ecosystem. The issue involves unbounded memory allocation decoding png `ztxt` "raw profile type iptc" chunks. Remediation is available by upgrading affected packages to version 0.17.3.

CVE-2026-103025 at a Glance

CVE Identifier CVE-2026-103025
GHSA Identifier GHSA-7hvw-3c2q-45qg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)
Affected Product bep/imagemeta
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-103025

To remediate this vulnerability, upgrade all affected bep/imagemeta dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/bep/imagemeta fixed: 0.17.3
Upgrade github.com/bep/imagemeta to 0.17.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/bep/imagemeta

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-103025, inspect your project dependencies for bep/imagemeta:

inspect dependencies for github.com/bep/imagemeta

Analyze the terminal output to locate any version of bep/imagemeta in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.17.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In bep/imagemeta, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A crafted PNG can make `imagemeta.Decode` allocate memory far in excess of the input file's size, leading to memory exhaustion. Two separate paths in the `zTXt` "Raw profile type iptc" branch are affected: the declared chunk length drives an allocation directly, and the embedded zlib stream is decompressed without an output bound. A 42-byte file allocated 256 MB, and a 127 KB file allocated 460 MB. ### Impact Denial of service by memory exhaustion against any application that decodes untrusted PNG images with this library. The decompression bomb is the more reliable vector, since it produces genuinely resident memory; the effect of the oversized `make` depends on the platform's overcommit behavior and any configured `GOMEMLIMIT` or cgroup limit. ### Patches Fixed in v0.17.3. ### Workarounds Reject or bound PNG input size before calling `Decode`, or clear `IPTC` from `Options.Sources` if IPTC metadata is not required. ### Credits Reported by Arpit Jain ([@arpitjain099](https://github.com/arpitjain099)).

CVE-2026-103025 Affected bep/imagemeta Versions

1 component(s)
Fixed Versions:
0.17.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/bep/imagemeta
Go
< 0.17.3
0.17.3

References

Frequently Asked Questions

What is CVE-2026-103025?
CVE-2026-103025 is a security vulnerability in bep/imagemeta involving Unbounded memory allocation decoding PNG `zTXt` "Raw profile type iptc" chunks under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification).
Which bep/imagemeta versions are affected?
Affected versions include releases prior to 0.17.3 across affected packages: github.com/bep/imagemeta.
What version fixes CVE-2026-103025?
Upgrading to 0.17.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/bep/imagemeta affected?
Yes, github.com/bep/imagemeta is affected in releases prior to 0.17.3. Upgrade your dependency to 0.17.3 or later.
What CWE is associated with CVE-2026-103025?
CVE-2026-103025 is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification) (The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.).
How can I check Go dependencies for CVE-2026-103025?
Run the dependency tree command: 'inspect dependencies for github.com/bep/imagemeta'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7hvw-3c2q-45qg",
  "modified" : "2026-11-20T00:20:52Z",
  "published" : "2026-11-20T00:20:52Z",
  "aliases" : [ "CVE-2026-103025" ],
  "summary" : "bep/imagemeta: Unbounded memory allocation decoding PNG `zTXt` \"Raw profile type iptc\" chunks",
  "details" : "A crafted PNG can make `imagemeta.Decode` allocate memory far in excess of the input file's size, leading to memory exhaustion. Two separate paths in the `zTXt` \"Raw profile type iptc\" branch are affected: the declared chunk length drives an allocation directly, and the embedded zlib stream is decompressed without an output bound. A 42-byte file allocated 256 MB, and a 127 KB file allocated 460 MB.\n\n### Impact\n\nDenial of service by memory exhaustion against any application that decodes untrusted PNG images with this library. The decompression bomb is the more reliable vector, since it produces genuinely resident memory; the effect of the oversized `make` depends on the platform's overcommit behavior and any configured `GOMEMLIMIT` or cgroup limit.\n\n### Patches\n\nFixed in v0.17.3. \n\n### Workarounds\n\nReject or bound PNG input size before calling `Decode`, or clear `IPTC` from `Options.Sources` if IPTC metadata is not required.\n\n### Credits\n\nReported by Arpit Jain ([@arpitjain099](https://github.com/arpitjain099)).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/bep/imagemeta"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.17.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bep/imagemeta/security/advisories/GHSA-7hvw-3c2q-45qg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-103025"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bep/imagemeta/pull/69"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bep/imagemeta/commit/2289fdf83fcd238d86f72e65c588da687c998437"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bep/imagemeta"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bep/imagemeta/releases/tag/v0.17.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-409", "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T00:20:52Z",
    "nvd_published_at" : "2026-11-19T20:17:12Z"
  }
}