All vulnerabilities

Go

CVE-2026-103025

bep/imagemeta: Unbounded memory allocation decoding PNG `zTXt` "Raw profile type iptc" chunks

Severity
High
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.17.3
Exploit chance
0.6% in the next 30 daysHigher than 47% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Decompression bomb (CWE-409)CWE-789
Also known as
GHSA-7hvw-3c2q-45qg
Sources
OSV.dev and GitHub

Description

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.

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.

From the GitHub Advisory Database, CC BY 4.0.

Workarounds

Reject or bound PNG input size before calling Decode, or clear IPTC from Options.Sources if IPTC metadata is not required.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
github.com/bep/imagemetaGo · osv:Go:github.com/bep/imagemeta
  • Every version before 0.17.3

About github.com/bep/imagemeta

This is the only vulnerability in github.com/bep/imagemeta in our list.

References