CVE-2025-3000: PyTorch: memory corruption in torch.jit.script compiler
MEDIUM PoC AVAILABLEPyTorch 2.6.0's JIT compiler has a memory corruption flaw (CWE-119) triggerable by any local user with low privileges — a realistic threat in shared ML infrastructure like JupyterHub, Kubeflow, or multi-tenant GPU clusters. A public exploit exists, raising near-term exploitation probability. Patch PyTorch when a fixed release is available and isolate untrusted code execution in the interim.
Risk Assessment
Nominal CVSS of 5.3 (Medium) understates operational risk for organizations running shared ML infrastructure. Local attack vector is trivially satisfied in multi-user training environments. Low complexity + low privilege requirements + public exploit = elevated practical risk beyond the base score. No CISA KEV listing suggests no active mass exploitation yet, but the public PoC changes the calculus for exposed environments.
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-
Monitor pytorch/pytorch#149623 for patch release and prioritize upgrade to fixed version.
-
Until patched: restrict torch.jit.script execution to trusted users only on shared ML platforms.
-
Run all PyTorch workloads in isolated containers with restrictive seccomp/AppArmor profiles and no-new-privileges.
-
Audit multi-tenant ML platforms for users who could submit arbitrary PyTorch code.
-
Alert on unexpected PyTorch process crashes or OOM events in training infrastructure as potential exploitation indicators.
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-3000?
PyTorch 2.6.0's JIT compiler has a memory corruption flaw (CWE-119) triggerable by any local user with low privileges — a realistic threat in shared ML infrastructure like JupyterHub, Kubeflow, or multi-tenant GPU clusters. A public exploit exists, raising near-term exploitation probability. Patch PyTorch when a fixed release is available and isolate untrusted code execution in the interim.
Is CVE-2025-3000 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-3000, increasing the risk of exploitation.
How to fix CVE-2025-3000?
1. Monitor pytorch/pytorch#149623 for patch release and prioritize upgrade to fixed version. 2. Until patched: restrict torch.jit.script execution to trusted users only on shared ML platforms. 3. Run all PyTorch workloads in isolated containers with restrictive seccomp/AppArmor profiles and no-new-privileges. 4. Audit multi-tenant ML platforms for users who could submit arbitrary PyTorch code. 5. Alert on unexpected PyTorch process crashes or OOM events in training infrastructure as potential exploitation indicators.
What systems are affected by CVE-2025-3000?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, MLOps pipelines, multi-tenant GPU clusters, Jupyter/notebook environments.
What is the CVSS score for CVE-2025-3000?
CVE-2025-3000 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.07%.
Technical Details
NVD Description
A vulnerability classified as critical has been found in PyTorch 2.6.0. This affects the function torch.jit.script. The manipulation leads to memory corruption. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used.
Exploitation Scenario
An attacker with a low-privilege account on a shared GPU training server crafts a Python script invoking torch.jit.script with a malformed function or class designed to trigger the memory corruption bug. During JIT compilation, the manipulated input corrupts adjacent memory structures. Depending on heap layout, this could enable arbitrary write primitives for privilege escalation on the host or, in Kubernetes-based ML platforms, a path to container escape. In a supply chain scenario, a malicious dependency could silently inject the exploit into a training pipeline.
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/149623 Issue Vendor
- github.com/pytorch/pytorch/issues/149623 Issue Vendor
- vuldb.com Permissions Required VDB
- vuldb.com 3rd Party VDB
- vuldb.com 3rd Party VDB
- github.com/fkie-cad/nvd-json-data-feeds Exploit
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