CVE-2026-136430 in PyTorchinfo

Summary

by MITRE • 11/24/2026

PyTorch Foundation PyTorch AOTIModelPackageLoader Directory Traversal Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of PyTorch Foundation PyTorch. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

The specific flaw exists within the AOTInductor model package loader. The issue results from the lack of proper validation of a user-supplied path prior to using it in file operations. An attacker can leverage this vulnerability to execute code in the context of the current user. Was ZDI-CAN-33055.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/25/2026

The PyTorch Foundation has addressed a critical security flaw within its AOTInductor model package loader, identified as CVE-2024-6978 and tracked by Zero Day Initiative under the identifier ZDI-CAN-33055. This vulnerability represents a significant risk to systems utilizing PyTorch for machine learning workloads that involve loading precompiled or Ahead-of-Time compiled models from external sources. The core of the issue lies in the insufficient validation of user-supplied file paths during the initialization and processing stages of the AOTIModelPackageLoader component. When an application attempts to load a model package, it relies on path strings provided by the input data or configuration files without adequately sanitizing them for directory traversal sequences such as dot-dot-slash characters. This lack of rigorous input validation allows an attacker to manipulate the intended file location, redirecting the loader to access arbitrary locations within the host filesystem rather than restricting operations to the designated model package directory.

From a technical perspective, this flaw is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory, which falls broadly under CWE-732 in some taxonomies depending on the specific context of file inclusion versus traversal. The vulnerability enables remote code execution because PyTorch often loads dynamic libraries or executes scripts as part of its model inference pipeline. By traversing directories upward from the intended package root, an attacker can point the loader to maliciously crafted files located elsewhere on the system, such as shared object files in system library paths or executable scripts with appropriate permissions. When the vulnerable component processes these manipulated paths, it may inadvertently load and execute code that resides outside the sandboxed model directory context. This effectively bypasses intended security boundaries designed to isolate untrusted machine learning artifacts from the rest of the operating system environment.

The operational impact of this vulnerability is severe due to its potential for remote code execution with the privileges of the user running the PyTorch application. Although exploitation requires a degree of user interaction, such as visiting a malicious webpage that triggers an automated model load or opening a specially crafted file within a compatible interface, the consequences are substantial if successful. An attacker who exploits this flaw can achieve arbitrary code execution on the affected host. This could lead to full system compromise, including data exfiltration, installation of persistent backdoors, lateral movement across networked systems, and disruption of critical machine learning services. The requirement for user interaction does not mitigate the severity significantly in environments where users are expected to load models from untrusted or semi-trusted sources, such as public model hubs or collaborative platforms.

Mitigation strategies must focus on both immediate patching and long-term architectural improvements. Organizations should immediately apply the latest security patches provided by the PyTorch Foundation that address this specific vulnerability in the AOTInductor component. Beyond software updates, developers integrating PyTorch into their applications should implement strict input validation mechanisms for all file paths passed to model loading functions. This includes canonicalizing paths and verifying that they reside within an expected whitelist of directories before any filesystem operations are performed. Additionally, adhering to the principle of least privilege is essential; running inference services under restricted user accounts with minimal filesystem permissions can limit the blast radius if a traversal attack succeeds. Security teams should also monitor for unusual file access patterns or unexpected library loads that may indicate exploitation attempts in progress.

In terms of threat intelligence and defense frameworks, this vulnerability aligns with MITRE ATT&CK techniques related to command and script interpreter abuse as well as unauthorized system information retrieval through path manipulation. Defense-in-depth measures such as application whitelisting, file integrity monitoring, and network segmentation can provide additional layers of protection against exploitation attempts. Regular security audits focusing on input validation in machine learning pipelines are recommended to identify similar weaknesses before they can be leveraged by adversaries. As the adoption of large language models and complex neural networks grows, ensuring that model loading mechanisms are robust against path traversal attacks becomes a critical component of overall cybersecurity hygiene for data science infrastructure.

Responsible

Zdi

Reservation

11/24/2026

Disclosure

11/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00741

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!