ZDI-26-1059: (0Day) PyTorch Foundation PyTorch torch_save_to_dcp Deserialization of Untrusted Data Remote Code Execution Vulnerability
Summary
This advisory addresses a Zero-Day Remote Code Execution (RCE) vulnerability in PyTorch Foundation PyTorch, tracked under CVE-2026-136433 and ZDI-26-1059. The vulnerability stems from the deserialization of untrusted data within the checkpoint format conversion utilities (torch_save_to_dcp). Exploitation requires user interaction, where a target must open a malicious file or visit a malicious web page. The vendor rejected the report as expected behavior, resulting in its public disclosure as a zero-day advisory.
Affected Products
- Vendor: PyTorch Foundation
- Product: PyTorch (specifically checkpoint format conversion utilities such as
torch_save_to_dcp)
Technical Details
The flaw exists within the checkpoint format conversion utilities of PyTorch, specifically involving torch_save_to_dcp. The issue results from a lack of proper validation of user-supplied data, leading to the deserialization of untrusted objects. An attacker can leverage this vulnerability to execute arbitrary code within the context of the current user running the application. Exploitation requires user interaction, such as tricking a target user into opening a crafted malicious checkpoint file or visiting a malicious link.
Impact
Successful exploitation allows remote attackers to execute arbitrary code on affected PyTorch installations in the context of the currently logged-in user.
- Confidentiality: High — Attackers can read, access, and exfiltrate sensitive data accessible by the running user process.
- Integrity: High — Attackers can modify application files, alter model data, or execute unauthorized system commands.
- Availability: High — Attackers can crash the application or cause a denial-of-service condition on the affected system.
Mitigation & Remediation Recommendations
- Restrict Product Interaction: Given the zero-day nature and the vendor's position classifying this as expected behavior, the primary mitigation strategy is to strictly restrict interactions with untrusted files.
- Validate Input Sources: Avoid opening, loading, or converting PyTorch checkpoint files obtained from unverified or untrusted third parties.
- Principle of Least Privilege: Run PyTorch applications and scripts under low-privileged user accounts (non-root/non-administrator) to minimize the impact of potential arbitrary code execution.
References
- ZDI-26-1059 Advisory Source Link — http://www.zerodayinitiative.com/advisories/ZDI-26-1059/
- NVD CVE-2026-136433 Vulnerability Record — https://nvd.nist.gov/vuln/detail/CVE-2026-136433
- MITRE CVE-2026-136433 Record — https://www.cve.org/CVERecord?id=CVE-2026-136433
- PyTorch Official Security Portal — https://github.com/pytorch/pytorch/security
Advisory ini disajikan tim ICT Cybersecurity PT Pertamina Bina Medika IHC sebagai informasi kesadaran keamanan. Verifikasi pada sumber resmi sebelum tindakan.