Critical severity9.8NVD Advisory· Published Aug 7, 2025· Updated Apr 15, 2026
CVE-2025-54951
CVE-2025-54951
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.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
executorchPyPI | < 0.7.0 | 0.7.0 |
org.pytorch:executorch-androidMaven | < 0.7.0 | 0.7.0 |
github.com/pytorch/executorchSwiftURL | < 0.7.0 | 0.7.0 |
Patches
1cea9b23aa8ffValidate kTensorDimensionLimit
3 files changed · +17 −0
runtime/executor/targets.bzl+1 −0 modified@@ -133,6 +133,7 @@ def define_common_targets(): ], deps = [ "//executorch/schema:program", + "//executorch/runtime/core/exec_aten/util:tensor_dimension_limit" ], visibility = [ "//executorch/runtime/executor/...",
runtime/executor/tensor_parser_aten.cpp+8 −0 modified@@ -10,6 +10,7 @@ #include <executorch/runtime/core/exec_aten/util/dim_order_util.h> #include <executorch/runtime/core/exec_aten/util/scalar_type_util.h> +#include <executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h> #include <executorch/runtime/core/named_data_map.h> #include <executorch/runtime/executor/memory_manager.h> #include <executorch/runtime/executor/program.h> @@ -58,6 +59,13 @@ Result<at::Tensor> parseTensor( s_tensor->sizes() != nullptr, InvalidProgram, "Missing sizes field"); size_t ndim = s_tensor->sizes()->size(); + ET_CHECK_OR_RETURN_ERROR( + ndim <= kTensorDimensionLimit, + InvalidProgram, + "Tensor rank too large %" ET_PRIsize_t " > %zu", + ndim, + kTensorDimensionLimit) + ET_CHECK_OR_RETURN_ERROR( s_tensor->dim_order() != nullptr, InvalidProgram,
runtime/executor/tensor_parser_portable.cpp+8 −0 modified@@ -11,6 +11,7 @@ #include <executorch/runtime/core/exec_aten/exec_aten.h> #include <executorch/runtime/core/exec_aten/util/dim_order_util.h> #include <executorch/runtime/core/exec_aten/util/scalar_type_util.h> +#include <executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h> #include <executorch/runtime/core/named_data_map.h> #include <executorch/runtime/executor/memory_manager.h> #include <executorch/runtime/executor/program.h> @@ -62,6 +63,13 @@ Result<Tensor> parseTensor( const auto serialized_sizes = s_tensor->sizes()->data(); const auto dim = s_tensor->sizes()->size(); + ET_CHECK_OR_RETURN_ERROR( + dim <= kTensorDimensionLimit, + InvalidProgram, + "Tensor rank too large %" PRIu32 " > %zu", + dim, + kTensorDimensionLimit) + ET_CHECK_OR_RETURN_ERROR( s_tensor->dim_order() != nullptr, InvalidProgram,
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.