PyTorch Memory Corruption Vulnerability in JIT Module Loading Function

Vulnerability

A memory corruption vulnerability has been identified in PyTorch version 2.6.0. The issue arises in the function 'torch.jit.jit_module_from_flatbuffer', where improper handling of input leads to memory being accessed outside of its intended boundaries. This vulnerability requires local access to exploit and has been publicly disclosed, with a proof-of-concept available.

Impact

Exploitation of this vulnerability leads to a segmentation fault, causing a denial-of-service condition by crashing the application.

Reproduction

The vulnerability can be reproduced by creating a simple neural network model using PyTorch's 'nn.Sequential' module. After scripting the model with 'torch.jit.script', it is saved to a Flatbuffer file using 'torch.jit.save_jit_module_to_flatbuffer'. The model is then loaded back from the Flatbuffer file with 'torch.jit.jit_module_from_flatbuffer' and a sample input tensor is passed to it. This process triggers a segmentation fault, indicating a memory corruption issue.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
2.5
exploitability
4.6
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.