Read the docs

Unbounded memory allocation in bep/imagemeta PNG zTXt decoding

Priority MEDIUM 44CWE-409Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-789.

Summary

bep/imagemeta, a Go library for reading EXIF, IPTC and XMP metadata from JPEG, TIFF, PNG and WebP files, is affected before 0.17.3. Decoding a PNG zTXt chunk with the keyword "Raw profile type iptc" can allocate far more memory than the input file size, because the declared chunk length drives the allocation and the embedded zlib stream is decompressed without an output limit (CWE-409, CWE-789). An unauthenticated remote attacker can exhaust memory by supplying a crafted PNG file. Applications that decode untrusted PNG files with IPTC metadata processing are at risk of denial of service.

Written with Claude Haiku 5.5 from the sources below · 2026-11-20

Description from the CNA

bep/imagemeta is a Go library for reading EXIF, IPTC and XMP image meta data from JPEG, TIFF, PNG, and WebP files. Prior to 0.17.3, imagemeta.Decode could exhaust memory when parsing PNG zTXt chunks whose keyword is "Raw profile type iptc": the declared chunk length can drive an allocation far larger than the input file, and the embedded zlib stream is decompressed without an output limit. The advisory reports a 42-byte input causing a 256 MB allocation and a 127 KB input inflating to 460 MB. The oversized-allocation path's memory effect depends on platform overcommit and configured GOMEMLIMIT or cgroup limits, while the decompression path reliably creates resident memory. Applications that decode untrusted PNGs with IPTC metadata processing can therefore suffer denial of service through memory exhaustion. This issue is fixed in 0.17.3.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00561 40th percentileScored 2026-11-30
Fix Fixed imagemeta (bep): 0.17.3github.com/bep/imagemeta (Go): 0.17.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
bepimagemetabefore 0.17.30.17.3Patch availableCNA
—github.com/bep/imagemeta (Go)before 0.17.30.17.3Patch availableGHSA-7hvw-3c2q-45qg
  • imagemeta Vendorbep Affected before 0.17.3 Fixed in 0.17.3 Patch available CNA
  • github.com/bep/imagemeta (Go) Vendor— Affected before 0.17.3 Fixed in 0.17.3 Patch available GHSA-7hvw-3c2q-45qg

Remediation

Update bep/imagemeta (Go module github.com/bep/imagemeta) to version 0.17.3 or later, which fixes the issue.

Written with Claude Haiku 5.5 from the sources below · 2026-11-20

  • Fix · CNA imagemeta (bep) Fixed in 0.17.3
  • Fix · GHSA-7hvw-3c2q-45qg github.com/bep/imagemeta (Go) Fixed in 0.17.3 Advisory →

Timeline

  1. 2026-11-19 Threatist record created from CVE-2026-103025
  2. 2026-11-19 CISA SSVC decision points changed
  3. 2026-11-20 Alias added: GHSA-7hvw-3c2q-45qg
  4. 2026-11-20 Fix available: Go/github.com/bep/[email protected] · GHSA-7hvw-3c2q-45qg
  5. 2026-11-20 CVSS score added · GHSA-7hvw-3c2q-45qg
  6. 2026-11-20 Weakness changed · GHSA-7hvw-3c2q-45qg
  7. 2026-11-20 6 new references · GHSA-7hvw-3c2q-45qg

References

  • TI-2025-23149 bep/imagemeta allows a potentially large memory allocation in PNG and WebP parsing CVSS 4.0MEDIUM 6.9
  • TI-2025-23148 bep/imagemeta allows excessively large EXIF data structures CVSS 4.0MEDIUM 6.9

Sources