`CHECK`-failures during Grappler's `IsSimplifiableReshape` in Tensorflow
Medium6.5CVE-2022-23581 · Published Feb 7, 2022 · updated Jul 13, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| tensorflow PyPI | < 2.5.3 | 2.5.3 |
| >= 2.6.0, < 2.6.3 | 2.6.3 | |
| >= 2.7.0, < 2.7.1 | 2.7.1 |
Details and references
### Impact The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that [`IsSimplifiableReshape`](https://github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc#L1687-L1742) would trigger `CHECK` failures. ### Patches We have patched the issue in GitHub commits [ebc1a2ffe5a7573d905e99bd0ee3568ee07c12c1](https://github.com/tensorflow/tensorflow/commit/ebc1a2ffe5a7573d905e99bd0ee3568ee07c12c1), [1fb27733f943295d874417630edd3b38b34ce082](https://github.com/tensorflow/tensorflow/commit/1fb27733f943295d874417630edd3b38b34ce082), and [240655511cd3e701155f944a972db71b6c0b1bb6](https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6). 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. ### For more information Please consult [our security guide](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md) for more information regarding the security model and how to contact us with issues and questions.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-617
- Also known as
- BIT-tensorflow-2022-23581, CVE-2022-23581, PYSEC-2022-145, PYSEC-2022-90, PYSEC-2026-3175
- github.com/tensorflow/tensorflow/security/advisories/GHSA-fq86-3f29-px2c
- nvd.nist.gov/vuln/detail/CVE-2022-23581
- github.com/tensorflow/tensorflow/commit/1fb27733f943295d874417630edd3b38b34ce082
- github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6
- github.com/tensorflow/tensorflow/commit/ebc1a2ffe5a7573d905e99bd0ee3568ee07c12c1
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2022-90.yaml
- github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2022-145.yaml
- github.com/tensorflow/tensorflow
- github.com/tensorflow/tensorflow/blob/a1320ec1eac186da1d03f033109191f715b2b130/tensorflow/core/grappler/optimizers/constant_folding.cc#L1687-L1742
More TensorFlow advisories
All TensorFlow| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Feb 72022 | Abort caused by allocating a vector that is too large in Tensorflow CVE-2022-23580Medium6.5fixed in 2.5.3, 2.6.3, 2.7.1 | Medium6.5 | 2.5.3, 2.6.3, 2.7.1 |
| Feb 92022 | Out of bounds read in Tensorflow CVE-2022-21726High8.1fixed in 2.5.3, 2.6.3, 2.7.1 | High8.1 | 2.5.3, 2.6.3, 2.7.1 |
| Feb 92022 | Integer overflow in Tensorflow CVE-2022-21727High7.6fixed in 2.5.3, 2.6.3, 2.7.1 | High7.6 | 2.5.3, 2.6.3, 2.7.1 |
| Feb 92022 | Out of bounds read in Tensorflow CVE-2022-21728High8.1fixed in 2.5.3, 2.6.3, 2.7.1 | High8.1 | 2.5.3, 2.6.3, 2.7.1 |
| Feb 92022 | Out of bounds read in Tensorflow CVE-2022-21730High8.1fixed in 2.5.3, 2.6.3, 2.7.1 | High8.1 | 2.5.3, 2.6.3, 2.7.1 |
| Feb 92022 | Out of bounds read and write in Tensorflow CVE-2022-23574High8.8fixed in 2.5.3, 2.6.3, 2.7.1 | High8.8 | 2.5.3, 2.6.3, 2.7.1 |