CVE-2025-2148: PyTorch: memory corruption in JIT profiler callback handler
HIGH PoC AVAILABLE CISA: TRACK*PyTorch 2.6.0+cu124 contains a memory corruption flaw in its JIT profiler that can be triggered remotely. While high attack complexity and required user interaction reduce immediate exploitation risk, organizations running this exact build in training clusters or GPU-accelerated inference should upgrade and monitor pytorch/pytorch#147722 for a patch. Disable JIT profiling in production as a compensating control until a fix is available.
Risk Assessment
High severity with constrained real-world exploitability. CVSS 7.5 reflects full-compromise potential (C:H/I:H/A:H), but AC:H and UI:R requirements significantly limit opportunistic attacks. Primary risk is in organizations running PyTorch 2.6.0+cu124 with any network-accessible surface—common in model serving APIs and distributed training setups. No public PoC or active exploitation observed; not in CISA KEV. Risk escalates if a weaponized PoC is published given PyTorch's ubiquity across the ML ecosystem.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| pytorch | pip | — | No patch |
Do you use pytorch? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Inventory: identify all PyTorch 2.6.0+cu124 deployments (pip show torch | grep Version).
-
Patch: upgrade to a patched PyTorch release once available; monitor pytorch/pytorch#147722 for fix status.
-
Compensating control: disable torch.profiler invocation in production code paths.
-
Network isolation: restrict inbound access to model serving endpoints backed by PyTorch (TorchServe, FastAPI/Triton wrappers).
-
Detection: alert on segfaults or abnormal memory errors in PyTorch processes; crashes in JIT/profiler context are IOCs.
-
Avoid loading untrusted serialized models (.pt/.pth) or executing untrusted PyTorch scripts in any environment using this build.
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-2148?
PyTorch 2.6.0+cu124 contains a memory corruption flaw in its JIT profiler that can be triggered remotely. While high attack complexity and required user interaction reduce immediate exploitation risk, organizations running this exact build in training clusters or GPU-accelerated inference should upgrade and monitor pytorch/pytorch#147722 for a patch. Disable JIT profiling in production as a compensating control until a fix is available.
Is CVE-2025-2148 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-2148, increasing the risk of exploitation.
How to fix CVE-2025-2148?
1. Inventory: identify all PyTorch 2.6.0+cu124 deployments (pip show torch | grep Version). 2. Patch: upgrade to a patched PyTorch release once available; monitor pytorch/pytorch#147722 for fix status. 3. Compensating control: disable torch.profiler invocation in production code paths. 4. Network isolation: restrict inbound access to model serving endpoints backed by PyTorch (TorchServe, FastAPI/Triton wrappers). 5. Detection: alert on segfaults or abnormal memory errors in PyTorch processes; crashes in JIT/profiler context are IOCs. 6. Avoid loading untrusted serialized models (.pt/.pth) or executing untrusted PyTorch scripts in any environment using this build.
What systems are affected by CVE-2025-2148?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving, ML development environments.
What is the CVSS score for CVE-2025-2148?
CVE-2025-2148 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.08%.
Technical Details
NVD Description
A vulnerability was found in PyTorch 2.6.0+cu124. It has been declared as critical. Affected by this vulnerability is the function torch.ops.profiler._call_end_callbacks_on_jit_fut of the component Tuple Handler. The manipulation of the argument None leads to memory corruption. The attack can be launched remotely. The complexity of an attack is rather high. The exploitation appears to be difficult.
Exploitation Scenario
An adversary targets an organization running a model serving API backed by PyTorch 2.6.0+cu124 with JIT compilation enabled. By crafting a malicious serialized model or adversarial inference request that routes through the profiler's JIT future callback handler with a None tuple argument, the attacker triggers memory corruption. In a realistic scenario—a TorchServe endpoint or Jupyter notebook server reachable over the network—this could escalate to remote code execution on the ML host, compromising training data, model weights, and any cloud credentials stored in the environment. User interaction (e.g., loading the crafted artifact) remains a required step, making phishing or dependency confusion a likely delivery vector.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H References
- github.com/pytorch/pytorch/issues/147722 Issue
- 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