GHSA-7hvw-3c2q-45qg

Suggest an improvement
Source
https://github.com/advisories/GHSA-7hvw-3c2q-45qg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-7hvw-3c2q-45qg/GHSA-7hvw-3c2q-45qg.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7hvw-3c2q-45qg
Aliases
Downstream
CGA (30)
Published
2026-11-20T00:20:52Z
Modified
2026-11-20T00:30:07Z
Severity
  • 8.7 (High) CVSS_V4 - 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 CVSS Calculator
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.

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).

Database specific
{
    "cwe_ids": [
        "CWE-409",
        "CWE-789"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-20T00:20:52Z",
    "nvd_published_at": "2026-11-19T20:17:12Z",
    "severity": "HIGH"
}
References

Affected packages

Go / github.com/bep/imagemeta

Package

Name
github.com/bep/imagemeta
View open source insights on deps.dev
Purl
pkg:golang/github.com/bep/imagemeta

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.17.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-7hvw-3c2q-45qg/GHSA-7hvw-3c2q-45qg.json"