CVE-2025-3000: PyTorch: memory corruption in torch.jit.script compiler
GHSA-rrmf-rvhw-rf47MEDIUMPoC 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.
What is the risk?
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.
What systems are affected?
How severe is it?
What is the attack surface?
What should I do?
5 stepsMonitor 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.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
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.20%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0050Command and Scripting InterpreterAML.T0105Escape to HostCompliance Controls Affected
What are the technical details?
Original Advisory
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)
CWE-119Improper Restriction of Operations within the Bounds of a Memory BufferPrimaryCWE-119Improper Restriction of Operations within the Bounds of a Memory BufferCWE-119 — Improper Restriction of Operations within the Bounds of a Memory Buffer: The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.
- [Requirements] Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:LReferences
- github.com/pytorch/pytorch/issues/149623IssueVendor
- github.com/pytorch/pytorch/issues/149623IssueVendor
- vuldb.comPermissions RequiredVDB
- vuldb.com3rd PartyVDB
- vuldb.com3rd PartyVDB
- github.com/advisories/GHSA-rrmf-rvhw-rf47
- github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-194.yaml
- github.com/pytorch/pytorch/commit/b90c94991cdf8b87c8f7439f79518e0ef2c4ca4f
- nvd.nist.gov/vuln/detail/CVE-2025-3000
- github.com/fkie-cad/nvd-json-data-feedsExploit
Timeline
Related Vulnerabilities
CVE-2024-54529.8pytorch-lightning: RCE via deepdiff Delta deserialization
Same package: torchCVE-2023-436549.8TorchServe: SSRF + RCE via unrestricted model URL loading
Same package: torchCVE-2022-459079.8PyTorch: RCE via unsafe eval in JIT annotations
Same package: torchCVE-2022-08459.8pytorch-lightning: code injection enables full RCE
Same package: torchCVE-2024-351989.8TorchServe: URL bypass enables arbitrary model loading
Same package: torch