ZDI-26-1058: (0Day) PyTorch Foundation PyTorch load_state_dict_from_url Deserialization of Untrusted Data Remote Code Execution Vulnerability
Summary
A zero-day Remote Code Execution (RCE) vulnerability has been identified in PyTorch Foundation PyTorch, tracked under CVE-2026-136431 and ZDI-26-1058. The vulnerability stems from untrusted data deserialization within the load_state_dict_from_url function. Carrying a CVSS score of 7.8 (High Severity), successful exploitation requires user interaction, such as convincing a target user to open a malicious file or visit a crafted webpage.
Affected Products
- PyTorch Foundation PyTorch
Technical Details
The vulnerability exists within the load_state_dict_from_url function of the PyTorch framework. The issue results from improper validation of user-supplied data, leading to the deserialization of untrusted data. An attacker can leverage this vulnerability to execute arbitrary code within the context of the current process when fetching and loading a state dictionary from a URL.
Impact
This vulnerability allows remote attackers to execute arbitrary code within the context of the running process, contingent on user interaction. The impact evaluation based on the CIA triad is as follows:
- Confidentiality: High — An attacker can execute arbitrary code, gaining unauthorized access to sensitive data and memory contents within the process context.
- Integrity: High — An attacker can modify data, tamper with files, or alter the execution logic of the application.
- Availability: High — An attacker can cause process crashes or disrupt service availability (Denial of Service).
Mitigation & Remediation Recommendations
- Restrict and limit interaction with the product, specifically avoiding the use of
load_state_dict_from_urlwith untrusted URLs or unverified external sources. - Isolate execution environments (e.g., using containers or sandboxing) when handling untrusted PyTorch model checkpoints.
- Monitor official PyTorch security channels and repositories for future patches or software updates.
References
- Zero Day Initiative Advisory ZDI-26-1058 — http://www.zerodayinitiative.com/advisories/ZDI-26-1058/
- NVD - CVE-2026-136431 — https://nvd.nist.gov/vuln/detail/CVE-2026-136431
- MITRE CVE Record - CVE-2026-136431 — https://www.cve.org/CVERecord?id=CVE-2026-136431
- PyTorch GitHub Security Page — 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.