VYPR
advisoryPublished Nov 24, 2026· 2 sources

PyTorch Foundation PyTorch AOTIModelPackageLoader Vulnerable to Directory Traversal and RCE

A directory traversal vulnerability in PyTorch Foundation's PyTorch AOTIModelPackageLoader allows remote attackers to execute arbitrary code on affected systems.

The Zero Day Initiative (ZDI) has disclosed a critical directory traversal vulnerability affecting PyTorch Foundation's PyTorch, specifically within its AOTIModelPackageLoader component. This flaw, assigned the identifier ZDI-26-1057, carries a CVSS score of 7.8 and enables remote attackers to achieve arbitrary code execution.

Exploitation of this vulnerability requires a degree of user interaction. Attackers must trick a victim into visiting a malicious web page or opening a specially crafted file. Once this prerequisite is met, the vulnerability can be triggered.

The root cause of the issue lies in the AOTInductor model package loader's failure to adequately validate user-supplied paths before using them in file operations. This oversight allows an attacker to manipulate paths, effectively traversing directories and potentially accessing or overwriting sensitive files, leading to code execution within the context of the current user.

According to the disclosure timeline, ZDI initially reported the vulnerability to the vendor via GitHub on September 2nd, 2026. However, the vendor reportedly rejected the report, considering the behavior expected and closing the advisory. Following this, ZDI notified the vendor of their intention to publish the details as a zero-day advisory on November 3rd, 2026, leading to the coordinated public release on November 24th, 2026.

Given the nature of the vulnerability, which relies on path manipulation and file operations, the primary mitigation strategy recommended is to restrict interaction with the product. This implies careful handling of any input or files processed by the AOTIModelPackageLoader, especially those originating from untrusted sources.

This vulnerability highlights ongoing challenges in securing complex machine learning frameworks like PyTorch. As these tools become more integrated into various applications, the attack surface expands, necessitating rigorous security testing and prompt vendor responses to reported vulnerabilities.

The vulnerability was discovered and reported by Alex Williams, who can be found at https://www.al443x.com.

This advisory serves as a reminder for developers and users of PyTorch to remain vigilant about security updates and to implement robust security practices when handling external data or code within their machine learning workflows.

This advisory details a command injection vulnerability within the PyTorch AOTIModelPackageLoader component, distinct from the directory traversal flaw previously reported. While the existing advisory focuses on path manipulation, this new vulnerability allows for arbitrary code execution through improper validation of user-supplied strings before system call execution. The Zero Day Initiative has assigned this vulnerability a CVSS score of 7.8, highlighting its significant remote code execution potential.

Synthesized by Vypr AI