CVE-2025-3000 in PyTorchinfo

Summary

by MITRE • 03/31/2025

A vulnerability classified as critical has been found in PyTorch 2.6.0. This affects the function torch.jit.script. The manipulation leads to memory corruption. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 06/16/2026

This critical vulnerability in PyTorch 2.6.0 resides within the torch.jit.script function, representing a severe memory corruption flaw that compromises system integrity. The vulnerability stems from inadequate input validation and memory management within the Just-In-Time compilation process, creating a pathway for malicious actors to manipulate memory structures through crafted inputs. The issue manifests when the torch.jit.script function processes untrusted or malformed data, leading to undefined behavior and potential system compromise. This flaw specifically targets the JIT compilation engine's handling of tensor operations and memory allocation patterns, making it particularly dangerous in machine learning environments where PyTorch is extensively used for model deployment and inference.

The operational impact of this vulnerability extends beyond simple memory corruption, as it enables local privilege escalation and potential code execution on affected systems. Attackers can leverage this flaw to manipulate memory layout, overwrite critical function pointers, or corrupt heap metadata through carefully crafted tensor operations within the JIT compilation context. The vulnerability's exploitability is heightened by the fact that it requires no network access, making local exploitation straightforward and increasing the attack surface significantly. Systems running PyTorch 2.6.0 with JIT compilation enabled are at risk, particularly in environments where model scripts are processed from untrusted sources or where automated model compilation occurs.

Security professionals should recognize this vulnerability as a variant of memory corruption issues classified under CWE-121, which encompasses buffer overflow conditions and heap-based buffer overflows. The attack vector aligns with techniques described in MITRE ATT&CK framework under T1059.001 for command and scripting interpreter, specifically targeting the Python runtime environment where PyTorch operates. The vulnerability demonstrates characteristics of T1068, which involves local privilege escalation through software exploitation, and T1555, covering credential access through compromised system processes. Organizations utilizing PyTorch for production workloads must urgently assess their deployment configurations to identify systems running vulnerable versions.

Mitigation strategies should prioritize immediate version upgrades to PyTorch 2.6.1 or later, which contains patches addressing the memory corruption issue within torch.jit.script. System administrators should implement runtime restrictions limiting JIT compilation privileges and consider disabling JIT compilation for untrusted model inputs. Additional protective measures include deploying memory protection mechanisms such as stack canaries, address space layout randomization, and heap integrity checks. Organizations should also establish monitoring protocols to detect anomalous memory access patterns and implement input sanitization procedures for all data processed through JIT compilation functions. The vulnerability's public disclosure status necessitates immediate action, as attackers may already be leveraging this flaw in targeted campaigns against machine learning infrastructure.

Responsible

VulDB

Disclosure

03/31/2025

Moderation

accepted

CPE

ready

Exploit

Download

EPSS

0.00190

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!