# CVE-2025-54949: Meta ExecuTorch heap buffer overflow in model loading

Source: https://junglewise.ai/threats/cve-2025-54949-meta-executorch-heap-buffer-overflow-in-model-loading  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-08-08. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-54949 · Severity: critical · CVSS 9.8 · Published 2025-08-08

ExecuTorch is Meta's framework for deploying machine learning models on edge devices. A heap buffer overflow vulnerability in the model loading process can be exploited remotely without authentication to achieve arbitrary code execution, compromising any device running affected ExecuTorch versions. This threatens the confidentiality, integrity, and availability of systems using this framework.

Technologies: [org.pytorch:executorch-android (Maven)](https://junglewise.ai/threats/technologies/org-pytorch-executorch-android), [executorch (PyPI)](https://junglewise.ai/threats/technologies/executorch), [github.com/pytorch/executorch (Swift)](https://junglewise.ai/threats/technologies/github-com-pytorch-executorch). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [PyPI](https://junglewise.ai/threats/vendors/pypi), [Swift](https://junglewise.ai/threats/vendors/swift).

## Quick answers

**Is CVE-2025-54949 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-54949 being exploited in the wild.

**How severe is CVE-2025-54949?** Critical severity, with a CVSS score of 9.8, published 8 August 2025.

**Which products and versions are affected?** org.pytorch:executorch-android (Maven) < 0.7.0, ECOSYSTEM:introduced=0,fixed=0.7.0; executorch (PyPI) < 0.7.0, ECOSYSTEM:introduced=0,fixed=0.7.0; github.com/pytorch/executorch (Swift) < 0.7.0.

**Is there a fix for CVE-2025-54949?** Yes. org.pytorch:executorch-android (Maven): upgrade to 0.7.0 or later; executorch (PyPI): upgrade to 0.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-54949 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-54949?** Check whether you run org.pytorch:executorch-android (Maven), executorch (PyPI) or github.com/pytorch/executorch (Swift) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- org.pytorch:executorch-android (Maven): upgrade to 0.7.0 or later

  ```sh
  # set org.pytorch:executorch-android to 0.7.0 in your pom.xml or build.gradle
  ```

- executorch (PyPI): upgrade to 0.7.0 or later

  ```sh
  pip install "executorch>=0.7.0"
  ```


## Technical details

A heap-based buffer overflow exists in ExecuTorch's model loading mechanism, specifically in the prim_ops::et_copy_index() function. The vulnerability arises from insufficient bounds checking when processing model buffers during deserialization. An attacker can exploit this by crafting a malicious ExecuTorch model file and delivering it to a target system; no authentication or user interaction is required. The attack is network-reachable, allowing remote exploitation. Successful exploitation enables arbitrary code execution with the privileges of the ExecuTorch process, potentially leading to complete system compromise. The fix is available in commit ede82493dae6d2d43f8c424e7be4721abe5242be, with patched versions released as 0.7.0 across all package ecosystems (pip, Maven, Swift).

## Affected products

- Meta Platforms, Inc ExecuTorch < 0.7.0
- PyTorch executorch (pip) < 0.7.0
- PyTorch executorch-android (Maven) < 0.7.0
- PyTorch executorch (Swift) < 0.7.0

## Identifiers

- CVE-2025-54949
- GHSA-9m39-3mf3-xwch
- PYSEC-2026-333

## Timeline

- 2025-08-07: disclosed: Published by NVD
- 2025-08-08: advisory: Published to GitHub Advisory Database as GHSA-9m39-3mf3-xwch
- 2025-08-07: patched: Fix available in commit ede82493dae6d2d43f8c424e7be4721abe5242be, version 0.7.0

## References

- [https://github.com/pytorch/executorch/commit/ede82493dae6d2d43f8c424e7be4721abe5242be](https://github.com/pytorch/executorch/commit/ede82493dae6d2d43f8c424e7be4721abe5242be)
- [https://www.facebook.com/security/advisories/cve-2025-54949](https://www.facebook.com/security/advisories/cve-2025-54949)

## Related threats

- [PYSEC-2026-1351 - ExecuTorch integer overflow vulnerability leads to code execution](https://junglewise.ai/threats/cve-2025-54952-meta-executorch-integer-overflow-in-model-loading)
- [PyTorch ExecuTorch out-of-bounds read in model loading](https://junglewise.ai/threats/cve-2025-54950-pytorch-executorch-out-of-bounds-read-in-model-loading)
- [PyTorch ExecuTorch integer overflow in model loading](https://junglewise.ai/threats/cve-2025-30404-pytorch-executorch-integer-overflow-in-model-loading)
- [Meta ExecuTorch integer overflow in model loading](https://junglewise.ai/threats/cve-2025-30405-meta-executorch-integer-overflow-in-model-loading)
- [ExecuTorch heap-based buffer overflow in model loading](https://junglewise.ai/threats/cve-2025-54951-executorch-heap-based-buffer-overflow-in-model-loading)
