ZDI-26-1057: (0Day) PyTorch Foundation PyTorch AOTIModelPackageLoader Directory Traversal Remote Code Execution Vulnerability
Summary
A zero-day Directory Traversal Remote Code Execution (RCE) vulnerability has been identified in PyTorch Foundation PyTorch, tracked under CVE-2026-136430 and ZDI-26-1057. The flaw stems from the lack of proper validation of user-supplied paths within the AOTInductor model package loader (AOTIModelPackageLoader). Successful exploitation enables remote attackers to execute arbitrary code within the context of the current user, requiring the target to open a malicious file or visit a malicious page.
Affected Products
- PyTorch Foundation PyTorch
Technical Details
The specific vulnerability resides within the AOTIModelPackageLoader component of PyTorch. The issue results from improper path validation before employing user-supplied paths in file system operations. An attacker can leverage this directory traversal weakness to execute arbitrary code in the context of the running user.
User interaction is required for exploitation (e.g., opening a crafted malicious file or visiting a malicious webpage). The vendor rejected the report, citing it as expected behavior, leading ZDI to disclose the vulnerability as a 0-day advisory.
- CVSS v3 Score: 7.8 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)
- Attack Vector: Local, Low Complexity, No Privileges Required, User Interaction Required.
Impact
An attacker can execute arbitrary code on affected installations of PyTorch within the security context of the logged-in user.
CIA Impact Assessment:
- Confidentiality: High — Attacker can gain full access to read sensitive data and system files accessible to the current user via code execution.
- Integrity: High — Attacker can modify, delete, or tamper with system files and data via code execution.
- Availability: High — Attacker can disrupt application services or cause a denial-of-service state on the host system.
Mitigation & Remediation Recommendations
- Restrict interaction with the product, specifically avoiding loading or opening untrusted model packages or files.
- Isolate PyTorch execution environments (e.g., utilizing containerization or sandboxing) to restrict potential impact in the event of an exploit attempt.
- Monitor official PyTorch communication channels and security advisories for potential future patches or policy updates.
References
- Zero Day Initiative Advisory Source Link — http://www.zerodayinitiative.com/advisories/ZDI-26-1057/
- NVD CVE-2026-136430 — https://nvd.nist.gov/vuln/detail/CVE-2026-136430
- MITRE CVE-2026-136430 — https://www.cve.org/CVERecord?id=CVE-2026-136430
- PyTorch Security / GitHub Repository — https://github.com/pytorch/pytorch
Advisory ini disajikan tim ICT Cybersecurity PT Pertamina Bina Medika IHC sebagai informasi kesadaran keamanan. Verifikasi pada sumber resmi sebelum tindakan.