Where
-Infinity
0
Severity
8.7
AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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

1 / 2
Source: GitHub
First published (updated )
Severity
8.7
AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

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

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203