Description
In versions of golang.org/x/image before v0.45.0, vp8l.Decode can allocate excessive memory when processing a crafted VP8L image containing many unused Huffman tree groups.
Potential impact
A remote attacker can exhaust memory in a service that decodes untrusted images. This may stop image processing or terminate the service process.
Remediation
Update golang.org/x/image to v0.45.0 or later, then rebuild and deploy. Also limit upload sizes and resource consumption by image processing tasks. Do not assume that limiting input file size alone limits memory usage during decoding.
Examples
The following examples show a dependency declaration in go.mod.
Before
go
require golang.org/x/image v0.44.0
After
go
require golang.org/x/image v0.45.0
Update go.sum and deploy an executable built with the fixed module.