CVE-2025-3001: PyTorch: lstm_cell memory corruption, local code exec
MEDIUM CISA: TRACK*PyTorch 2.6.0 has a memory corruption bug in torch.lstm_cell (CWE-119) exploitable by any local user with low privileges. In shared GPU/compute environments — MLOps clusters, Jupyter hubs, model training farms — this is a lateral movement or privilege escalation vector. Audit exposure on multi-tenant AI infrastructure and prioritize patching where PyTorch runs alongside sensitive model weights or training data.
Risk Assessment
Rated CVSS 5.3 Medium, but contextual risk is higher in shared AI compute environments. Attack complexity is Low and no user interaction is required — any authenticated user on the box can trigger it. Memory corruption (CWE-119) in a core tensor operation historically enables DoS and potentially arbitrary code execution depending on heap layout. Not in CISA KEV and no confirmed in-the-wild exploitation, but the exploit is public, lowering the bar for abuse significantly.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| pytorch | pip | — | No patch |
Do you use pytorch? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Pin PyTorch to a patched release as soon as upstream publishes a fix; monitor pytorch/pytorch#149626 for patch status.
-
Interim workaround: restrict torch.lstm_cell usage to vetted, trusted code paths; do not expose LSTM inference endpoints to untrusted input without input validation.
-
In shared environments (Jupyter, Ray, Kubeflow), apply OS-level process isolation (namespaces, seccomp) to limit blast radius.
-
Enable crash monitoring on PyTorch processes — repeated crashes of lstm_cell paths may indicate exploitation attempts.
-
Audit which services in your AI stack use LSTM models and their network/user exposure.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-3001?
PyTorch 2.6.0 has a memory corruption bug in torch.lstm_cell (CWE-119) exploitable by any local user with low privileges. In shared GPU/compute environments — MLOps clusters, Jupyter hubs, model training farms — this is a lateral movement or privilege escalation vector. Audit exposure on multi-tenant AI infrastructure and prioritize patching where PyTorch runs alongside sensitive model weights or training data.
Is CVE-2025-3001 actively exploited?
No confirmed active exploitation of CVE-2025-3001 has been reported, but organizations should still patch proactively.
How to fix CVE-2025-3001?
1. Pin PyTorch to a patched release as soon as upstream publishes a fix; monitor pytorch/pytorch#149626 for patch status. 2. Interim workaround: restrict torch.lstm_cell usage to vetted, trusted code paths; do not expose LSTM inference endpoints to untrusted input without input validation. 3. In shared environments (Jupyter, Ray, Kubeflow), apply OS-level process isolation (namespaces, seccomp) to limit blast radius. 4. Enable crash monitoring on PyTorch processes — repeated crashes of lstm_cell paths may indicate exploitation attempts. 5. Audit which services in your AI stack use LSTM models and their network/user exposure.
What systems are affected by CVE-2025-3001?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, shared ML compute clusters, MLOps pipelines.
What is the CVSS score for CVE-2025-3001?
CVE-2025-3001 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.21%.
Technical Details
NVD Description
A vulnerability classified as critical was found in PyTorch 2.6.0. This vulnerability affects the function torch.lstm_cell. The manipulation leads to memory corruption. The attack needs to be approached locally. The exploit has been disclosed to the public and may be used.
Exploitation Scenario
An adversary with a low-privilege account on a shared ML training cluster crafts a malformed tensor input to torch.lstm_cell with dimensions or strides that violate buffer boundaries. On a vulnerable PyTorch 2.6.0 install, this triggers heap corruption. In a best-case attacker scenario on a training node, this corrupts adjacent heap memory — potentially overwriting model weights in memory, crashing the training process, or with precise heap grooming achieving code execution under the training job's service account, which often has access to cloud storage buckets containing proprietary model artifacts and datasets.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L References
- github.com/pytorch/pytorch/issues/149626 Issue Vendor
- github.com/pytorch/pytorch/issues/149626 Issue Vendor
- vuldb.com Permissions Required VDB
- vuldb.com 3rd Party VDB
- vuldb.com 3rd Party VDB
Timeline
Related Vulnerabilities
CVE-2024-5452 9.8 pytorch-lightning: RCE via deepdiff Delta deserialization
Same package: torch CVE-2023-43654 9.8 TorchServe: SSRF + RCE via unrestricted model URL loading
Same package: torch CVE-2022-45907 9.8 PyTorch: RCE via unsafe eval in JIT annotations
Same package: torch CVE-2022-0845 9.8 pytorch-lightning: code injection enables full RCE
Same package: torch CVE-2024-35198 9.8 TorchServe: URL bypass enables arbitrary model loading
Same package: torch
AI Threat Alert