Executive brief
ExecuTorch is Meta's framework for running machine learning models on edge devices and servers. An integer overflow bug in the model loading process can cause the memory allocator to create overlapping memory regions, allowing an attacker to corrupt memory and potentially execute arbitrary code. This affects any application loading untrusted ExecuTorch models over the network.
Technical details
The vulnerability is a CWE-190 integer overflow in ExecuTorch's memory allocator. When loading a model, the allocate() function fails to properly validate size calculations, allowing an attacker to craft a malicious model file that triggers an integer overflow. This results in overlapping memory allocations, leading to heap corruption. The attack vector is network-based with no privileges or user interaction required. An attacker can send a crafted ExecuTorch model file to trigger the overflow, achieving arbitrary code execution, data corruption, or denial of service. The vulnerability is fixed in commit d158236b1dc84539c1b16843bc74054c9dcba006 (version 0.7.0 and later) by adding proper overflow checks in the memory_allocator.h allocate() function.
Affected products
- Meta Platforms, Inc. ExecuTorch < 0.7.0
- PyTorch executorch < 0.7.0
- PyTorch executorch-android < 0.7.0
Timeline
- 2025-08-07: disclosed: Published to NVD
- 2025-08-08: advisory: Published to GitHub Advisory Database
- 2025-08-07: patched: Fix available in commit d158236b1dc84539c1b16843bc74054c9dcba006 and version 0.7.0