Intel

AIKIDO-2026-294725

torchvision is vulnerable to Out-of-bounds Read

Out-of-bounds ReadCVE-2026-65918 Published 3 days ago

71

High Risk

This Affects:

PYTHONtorchvision
0.19.0 - 0.27.1
Fixed in 0.28.0
Are you affected? Scan for Free

TL;DR

The native GIF decoder's read_from_tensor callback passes an unclamped length to memcpy when copying encoded bytes into the GIFLIB read buffer. Decoding a malicious or truncated GIF makes the copy run past the end of the input heap buffer. This can crash the process with a segmentation fault or leak adjacent heap memory into the decode path. The fix clamps the copied length to the number of bytes actually remaining in the input tensor.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you decode untrusted or user-supplied GIF images.

Background info

torchvision is vulnerable to Out-of-bounds Read in versions 0.19.0 - 0.27.1.

How to fix this

Upgrade the torchvision library to the patch version.