CVE-2025-54951 ExecuTorch vulnerable to Heap-based Buffer Overflow

Critical 9.8 Published Updated

Buffer overflows in ExecuTorch model loading allow attackers to cause crashes or execute arbitrary code.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-54951?

CVE-2025-54951 is a critical memory corruption vulnerability in Meta Platforms, Inc ExecuTorch, published on 7 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A group of related buffer overflow vulnerabilities in the loading of ExecuTorch models can cause the runtime to crash and potentially result in code execution or other undesirable effects. This issue affects ExecuTorch prior to commit cea9b23aa8ff78aff92829a466da97461cc7930c.

Weakness: CWE-122

Which versions are affected by CVE-2025-54951?

7 open source packages ship an affected version, including executorch, org.pytorch:executorch-android and github.com/pytorch/executorch.

PackageAffectedFixed in
executorch PyPIAll versions0.7.0
executorch PyPIAll versions0.7.0
executorch PyPIAll versions0.7.0
org.pytorch:executorch-android MavenAll versions0.7.0
org.pytorch:executorch-android MavenAll versions0.7.0
github.com/pytorch/executorch SwiftURLAll versions0.7.0
1 more packages
github.com/pytorch/executorch SwiftURLAll versions0.7.0

How do I fix CVE-2025-54951?

Upgrade executorch to 0.7.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-54951 being exploited?

There is no known exploitation of CVE-2025-54951 in the wild and no public exploit code.

Sources

Also known as GHSA-xc7w-r669-48pf, PYSEC-2026-336.

Is CVE-2025-54951 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free