VYPR
Moderate severityNVD Advisory· Published Feb 4, 2022· Updated Apr 22, 2025

`CHECK`-fails due to attempting to build a reference tensor in Tensorflow

CVE-2022-23588

Description

Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a SavedModel such that Grappler optimizer would attempt to build a tensor using a reference dtype. This would result in a crash due to a CHECK-fail in the Tensor constructor as reference types are not allowed. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
tensorflowPyPI
< 2.5.32.5.3
tensorflowPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflowPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-cpuPyPI
< 2.5.32.5.3
tensorflow-cpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-cpuPyPI
>= 2.7.0, < 2.7.12.7.1
tensorflow-gpuPyPI
< 2.5.32.5.3
tensorflow-gpuPyPI
>= 2.6.0, < 2.6.32.6.3
tensorflow-gpuPyPI
>= 2.7.0, < 2.7.12.7.1

Affected products

1

Patches

1
6b5adc0877de

Prevent `CHECK`-fail when building reference tensor.

https://github.com/tensorflow/tensorflowMihai MaruseacNov 13, 2021via ghsa
1 file changed · +5 0
  • tensorflow/core/grappler/optimizers/constant_folding.cc+5 0 modified
    @@ -1363,6 +1363,11 @@ Status ConstantFolding::EvaluateOneFoldable(const NodeDef& node,
                               input_tensor.ToString(),
                               " has a dtype of DT_INVALID."));
         }
    +    if (IsRefType(raw_val.dtype())) {
    +      return errors::InvalidArgument(
    +          "Not allowed to construct a tensor with reference dtype, got ",
    +          DataTypeString(raw_val.dtype()));
    +    }
         Tensor* value = new Tensor(raw_val.dtype(), raw_val.tensor_shape());
         if (!value->FromProto(raw_val)) {
           delete (value);
    

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

8

News mentions

0

No linked articles in our index yet.