MEDIUM5.3
GO-2026-5031
Panic when reading out of bound palette index in golang.org/x/image/bmp
Quick fix
GO-2026-5031 — golang.org/x/image: upgrade to the fixed version with the command below.
go get golang.org/x/image@v0.41.0Details
Decoding a paletted BMP file with an out-of-range palette index results in a panic when accessing pixels in the invalid image.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:golang/golang.org/x/image"]}'