PyTorch torch.lstm_cell Memory Corruption Vulnerability
MediumExecutive Summary
A critical memory corruption vulnerability, identified as CVE-2025-3001, has been found in PyTorch 2.6.0 affecting the torch.lstm_cell function, potentially leading to system crashes or unexpected behavior. The exploit has been publicly disclosed and reproduced, requiring immediate attention for systems running untrusted or local model code.
Vulnerability Details
- Affected Product: PyTorch 2.6.0
- Identifier: CVE-2025-3001
- CVSS Score: 4.8 (Medium)
- Exploitation Status: Exploit Disclosed and May Be Used
Risk & Impact
- Triage: Urgent action is required, especially in environments executing untrusted model code.
- Attack Vector: The attack needs to be approached locally.
- Ease of Exploit: Low attack complexity with a public proof-of-concept.
Action Plan
- Immediate Action: Upgrade to a patched version of PyTorch or apply available vendor patches.
- Workaround: Disable or block model submission paths that permit execution of torch.lstm_cell in untrusted jobs; enforce sandboxing and strict per-job resource limits.
- Detection: Enumerate all containers, images, and hosts that include PyTorch and use automated scanning to find torch==2.6.0. Use `python -c "import torch; print(torch.version)"` on representative hosts and containers.
Relevant professional terms
- Memory Corruption
- A cybersecurity vulnerability that occurs when a program writes data outside the allocated memory space, leading to unexpected behavior, system instability, crashes, or security vulnerabilities.
- LSTM (Long Short-Term Memory)
- A special type of recurrent neural network (RNN) architecture designed to learn and remember information over long sequences of data, mitigating the vanishing gradient problem.
Source: Microsoft
