High severityNVD Advisory· Published Feb 4, 2022· Updated Apr 22, 2025
Out of bounds read in Tensorflow
CVE-2022-23592
Description
Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a DCHECK (which is a no-op during production). An attacker can control the input_idx variable such that ix would be larger than the number of values in node_t.args. The fix will be included in TensorFlow 2.8.0. This is the only affected version.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
tensorflowPyPI | >= 2.8.0-rc0, < 2.8.0 | 2.8.0 |
tensorflow-cpuPyPI | >= 2.8.0-rc0, < 2.8.0 | 2.8.0 |
tensorflow-gpuPyPI | >= 2.8.0-rc0, < 2.8.0 | 2.8.0 |
Affected products
1- Range: = 2.8.0-rc0
Patches
1c99d98cd1898Handle invalid inputs instead of crashing.
1 file changed · +10 −4
tensorflow/core/graph/graph.cc+10 −4 modified@@ -222,10 +222,16 @@ void Node::RunForwardTypeInference() { const auto& node_t = node->def().experimental_type(); if (node_t.type_id() != TFT_UNSET) { int ix = input_idx[i]; - DCHECK(ix < node_t.args_size()) - << "input " << i << " should have an output " << ix - << " but instead only has " << node_t.args_size() - << " outputs: " << node_t.DebugString(); + if (ix >= node_t.args_size()) { + LOG(WARNING) << name() << " has bad type information: input " << i + << " should have an output " << ix + << " but instead only has " << node_t.args_size() + << " outputs: " << node_t.DebugString() + << "\nThis indicates either " + "a bug in op registration or a corrupted graph."; + ClearTypeInfo(); + return; + } input_types.emplace_back(node_t.args(ix)); } else { input_types.emplace_back(*no_type);
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
7- github.com/advisories/GHSA-vq36-27g6-p492ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-23592ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-101.yamlghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-156.yamlghsaWEB
- github.com/tensorflow/tensorflow/blob/274df9b02330b790aa8de1cee164b70f72b9b244/tensorflow/core/graph/graph.ccghsax_refsource_MISCWEB
- github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abdghsax_refsource_MISCWEB
- github.com/tensorflow/tensorflow/security/advisories/GHSA-vq36-27g6-p492ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.