CVE-2026-136432 in PyTorch
Summary
by MITRE • 11/24/2026
PyTorch Foundation PyTorch FileSystemReader Deserialization of Untrusted Data Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of PyTorch. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
The specific flaw exists within the FileSystemReader class. The issue results from the lack of proper validation of user-supplied data, which can result in deserialization of untrusted data. An attacker can leverage this vulnerability to execute code in the context of the current process. Was ZDI-CAN-32600.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/25/2026
The PyTorch Foundation has addressed a critical security flaw within its deep learning framework, specifically identified as CVE ID associated with advisory ZDI-CAN-32600. This vulnerability centers on the FileSystemReader class, which is designed to handle file system operations for loading model data and other resources. The core technical deficiency lies in the deserialization mechanism employed by this component. When processing input files, the library fails to adequately validate or sanitize user-supplied data before passing it to Python's pickle module or similar serialization libraries. This lack of rigorous validation allows an attacker who can influence the file paths or contents accessed by the FileSystemReader to inject malicious serialized objects into the application context.
From a technical perspective, this flaw represents a classic instance of insecure deserialization. In many programming environments, including those used in PyTorch's backend implementations, deserializing untrusted data is inherently dangerous because it can trigger arbitrary code execution during the object reconstruction process. An attacker does not necessarily need to exploit a network-facing service directly; rather, they must have some level of interaction with the library that allows them to specify which files are read or manipulated by the FileSystemReader. This could involve tricking a user into opening a maliciously crafted model file, configuring a training script to load data from an untrusted directory, or exploiting any application logic that relies on this class for input handling. The attack vector is thus dependent on the specific implementation details of the software integrating PyTorch, but the underlying risk remains severe due to the direct path it provides to remote code execution.
The operational impact of this vulnerability is significant, as successful exploitation grants an attacker the ability to execute arbitrary commands with the same privileges as the user running the PyTorch process. This can lead to complete compromise of the host system, including data exfiltration, installation of backdoors, or use of the compromised machine for further attacks in a networked environment. Given that PyTorch is widely used in research and production environments often involving sensitive datasets and high-performance computing resources, such a breach could result in substantial intellectual property loss and operational disruption. The vulnerability aligns with CWE-502, which describes deserialization of untrusted data as a distinct weakness category recognized by the Common Weakness Enumeration standard for its potential to cause severe system compromise.
To mitigate this risk, organizations utilizing PyTorch must ensure they are running patched versions that address the validation logic within the FileSystemReader class. It is crucial to review application code that interacts with file systems and model loading mechanisms to avoid passing untrusted paths or contents directly into serialization routines without proper sanitization. Additionally, adopting a principle of least privilege for processes running PyTorch can limit the blast radius in case an exploit occurs. Security teams should also monitor for any unusual process executions originating from Python interpreters associated with machine learning workloads. This incident underscores the importance of treating all external inputs as untrusted and implementing strict validation controls within data loading pipelines, a practice that aligns with ATT&CK technique T1059 regarding command and script interpretation through automated exploitation frameworks.