CVE-2024-48063: PyTorch: RCE via RemoteModule deserialization
CRITICAL PoC AVAILABLE CISA: ATTENDPyTorch's RemoteModule deserializes arbitrary Python objects over the network without validation, enabling unauthenticated RCE. While PyTorch disputes this as intended behavior for trusted distributed environments, any organization exposing distributed PyTorch workers to untrusted networks is critically exposed. Audit network segmentation for all distributed training and inference infrastructure immediately—distributed PyTorch must never be reachable from untrusted networks.
Risk Assessment
High real-world risk despite the disputed status. CVSS 9.8 reflects technical reality: unauthenticated network-accessible RCE with no interaction required. The dispute is a design philosophy argument—PyTorch assumes a trusted network for distributed features—but ML teams routinely misconfigure network exposure. In cloud environments with shared VPCs, multi-tenant clusters, or improperly segmented training farms, exploitation is trivial. A publicly available PoC exploit increases probability of opportunistic attacks 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
6 steps-
Immediately audit network exposure: enumerate all PyTorch distributed workers and verify they are unreachable from untrusted networks.
-
Enforce strict network segmentation—distributed PyTorch RPC ports must be firewalled to the training cluster VPC only.
-
If remote access is required, route exclusively through authenticated VPN or bastion with mutual TLS.
-
No vendor patch available (vendor disputes as by-design)—mitigation is architectural, not code-based.
-
Detection: monitor for unexpected outbound connections from ML training nodes; alert on torch.distributed port access from non-whitelisted IPs.
-
Review PyTorch's official security policy on distributed features and validate your deployment assumptions match their threat model.
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-2024-48063?
PyTorch's RemoteModule deserializes arbitrary Python objects over the network without validation, enabling unauthenticated RCE. While PyTorch disputes this as intended behavior for trusted distributed environments, any organization exposing distributed PyTorch workers to untrusted networks is critically exposed. Audit network segmentation for all distributed training and inference infrastructure immediately—distributed PyTorch must never be reachable from untrusted networks.
Is CVE-2024-48063 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2024-48063, increasing the risk of exploitation.
How to fix CVE-2024-48063?
1. Immediately audit network exposure: enumerate all PyTorch distributed workers and verify they are unreachable from untrusted networks. 2. Enforce strict network segmentation—distributed PyTorch RPC ports must be firewalled to the training cluster VPC only. 3. If remote access is required, route exclusively through authenticated VPN or bastion with mutual TLS. 4. No vendor patch available (vendor disputes as by-design)—mitigation is architectural, not code-based. 5. Detection: monitor for unexpected outbound connections from ML training nodes; alert on torch.distributed port access from non-whitelisted IPs. 6. Review PyTorch's official security policy on distributed features and validate your deployment assumptions match their threat model.
What systems are affected by CVE-2024-48063?
This vulnerability affects the following AI/ML architecture patterns: Distributed training pipelines, Parameter server architectures, Distributed inference serving, Federated learning infrastructure, Multi-node ML clusters.
What is the CVSS score for CVE-2024-48063?
CVE-2024-48063 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 25.10%.
Technical Details
NVD Description
In PyTorch <=2.4.1, the RemoteModule has Deserialization RCE. NOTE: this is disputed by multiple parties because this is intended behavior in PyTorch distributed computing.
Exploitation Scenario
An adversary identifies a distributed PyTorch training cluster with RPC ports accessible from the internet or an adjacent compromised subnet. Using the published Notion-hosted PoC, they craft a malicious serialized Python pickle payload and send it to the RemoteModule RPC endpoint. PyTorch deserializes the payload without validation, executing arbitrary code as the training process user—typically with broad access to cloud credentials (AWS/GCP/Azure IAM roles), proprietary model weights, and training datasets. The attacker establishes persistence, exfiltrates model artifacts and data, and pivots laterally across all worker nodes participating in the distributed training job.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
- gist.github.com/hexian2001/c046c066895a963ecc0a2cf9e1180065 3rd Party
- github.com/pytorch/pytorch/issues/129228 Not Applicable
- github.com/pytorch/pytorch/security/policy Product
- rumbling-slice-eb0.notion.site/Distributed-RPC-Framework-RemoteModule-has-Deserialization-RCE-in-pytorch-pytorch-111e3cda9e8c8021a7d3cbc61ee1a20c Exploit
- github.com/Solar-Lu/Notes Exploit
- github.com/fkie-cad/nvd-json-data-feeds Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
- github.com/zgimszhd61/CVE-2024-48063-poc 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