CVE-2022-21731

Summary

CVECVE-2022-21731
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-02-03 12:15:00 UTC
Updated2022-02-09 03:06:00 UTC
DescriptionTensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ConcatV2` can be used to trigger a denial of service attack via a segfault caused by a type confusion. The `axis` argument is translated into `concat_dim` in the `ConcatShapeHelper` helper function. Then, a value for `min_rank` is computed based on `concat_dim`. This is then used to validate that the `values` tensor has at least the required rank. However, `WithRankAtLeast` receives the lower bound as a 64-bits value and then compares it against the maximum 32-bits integer value that could be represented. Due to the fact that `min_rank` is a 32-bits value and the value of `axis`, the `rank` argument is a negative value, so the error check is bypassed. 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.

Risk And Classification

Problem Types: CWE-843

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Google Tensorflow 2.7.0 All All All
Application Google Tensorflow All All All All
Application Google Tensorflow All All All All

References

ReferenceSourceLinkTags
Fix Segfault in Concat V2 shape function. · tensorflow/tensorflow@08d7b00 · GitHub MISC github.com
tensorflow/common_shape_fns.cc at 5100e359aef5c8021f2e71c7b986420b85ce7b3d · tensorflow/tensorflow · GitHub MISC github.com
Type confusion in shape inference for `ConcatV2` · Advisory · tensorflow/tensorflow · GitHub CONFIRM github.com
tensorflow/shape_inference.cc at 5100e359aef5c8021f2e71c7b986420b85ce7b3d · tensorflow/tensorflow · GitHub MISC github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report