High severityNVD Advisory· Published Dec 6, 2022· Updated Apr 23, 2025
Out of bounds write in grappler in Tensorflow
CVE-2022-41902
Description
TensorFlow is an open source platform for machine learning. The function MakeGrapplerFunctionItem takes arguments that determine the sizes of inputs and outputs. If the inputs given are greater than or equal to the sizes of the outputs, an out-of-bounds memory read or a crash is triggered. We have patched the issue in GitHub commit a65411a1d69edfb16b25907ffb8f73556ce36bb7. The fix will be included in TensorFlow 2.11.0. We will also cherrypick this commit on TensorFlow 2.8.4, 2.9.3, and 2.10.1.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
tensorflowPyPI | < 2.8.4 | 2.8.4 |
tensorflowPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflowPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
tensorflow-cpuPyPI | < 2.8.4 | 2.8.4 |
tensorflow-gpuPyPI | < 2.8.4 | 2.8.4 |
tensorflow-cpuPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflow-gpuPyPI | >= 2.9.0, < 2.9.3 | 2.9.3 |
tensorflow-cpuPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
tensorflow-gpuPyPI | >= 2.10.0, < 2.10.1 | 2.10.1 |
Affected products
1- Range: >= 2.10.0, < 2.10.1
Patches
1a65411a1d69eFix OOB write in grappler.
1 file changed · +5 −0
tensorflow/core/grappler/utils/functions.cc+5 −0 modified@@ -291,6 +291,11 @@ Status MakeGrapplerFunctionItem(const FunctionDef& func, std::vector<const FunctionDef::ArgAttrs*> arg_attr(inputs.size(), nullptr); for (const auto& attr : func.arg_attr()) { + if (attr.first >= inputs.size()) { + return errors::InvalidArgument("Invalid attribute index, got ", + attr.first, " but expected less than ", + inputs.size()); + } arg_attr.at(attr.first) = &attr.second; }
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
5- github.com/advisories/GHSA-cg88-rpvp-cjv5ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-41902ghsaADVISORY
- github.com/tensorflow/tensorflow/blob/master/tensorflow/core/grappler/utils/functions.ccghsaWEB
- github.com/tensorflow/tensorflow/commit/a65411a1d69edfb16b25907ffb8f73556ce36bb7ghsaWEB
- github.com/tensorflow/tensorflow/security/advisories/GHSA-cg88-rpvp-cjv5ghsaWEB
News mentions
0No linked articles in our index yet.