9.8critical
TensorFlow vulnerable to heap out-of-buffer read in the QuantizeAndDequantize operation
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.84% (higher than 59% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gw97-ff7c-9v96BIT-TENSORFLOW-2023-25668PYSEC-2026-548PYSEC-2026-549PYSEC-2026-550
Description
TensorFlow is an open source platform for machine learning. Attackers using Tensorflow prior to 2.12.0 or 2.11.1 can access heap memory which is not in the control of user, leading to a crash or remote code execution. The fix will be included in TensorFlow version 2.12.0 and will also cherrypick this commit on TensorFlow version 2.11.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| tensorflow tensorflow | < 2.11.1 | CVE List |
| tensorflow (PyPI) | before 2.11.1 | GitHub Advisory Database, PyPA Advisory Database |
| tensorflow-cpu (PyPI) | before 2.11.1 | GitHub Advisory Database, PyPA Advisory Database |
| tensorflow-gpu (PyPI) | before 2.11.1 | GitHub Advisory Database, PyPA Advisory Database |
| google tensorflow | before 2.12.0 | NVD |
| tensorflow (Bitnami) | before 2.12.0 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | critical rating |
Classification
What each source says
CVE List
TensorFlow is an open source platform for machine learning. Attackers using Tensorflow prior to 2.12.0 or 2.11.1 can access heap memory which is not in the control of user, leading to a crash or remote code execution. The fix will be included in TensorFlow version 2.12.0 and will also cherrypick this commit on TensorFlow version 2.11.1.
GitHub Advisory Database
Impact
Attackers using Tensorflow can exploit the vulnerability. They can access heap memory which is not in the control of user, leading to a crash or RCE. When axis is larger than the dim of input, c->Dim(input,axis) goes out of bound. Same problem occurs in the QuantizeAndDequantizeV2/V3/V4/V4Grad operations too.
import tensorflow as tf
@tf.function
def test():
tf.raw_ops.QuantizeAndDequantizeV2(input=[2.5],
input_min=[1.0],
input_max=[10.0],
signed_input=True,
num_bits=1,
range_given=True,
round_mode='HALF_TO_EVEN',
narrow_range=True,
axis=0x7fffffff)
test()
Patches
We have patched the issue in GitHub commit 7b174a0f2e40ff3f3aa957aecddfd5aaae35eccb.
The fix will be included in TensorFlow 2.12.0. We will also cherrypick this commit on TensorFlow 2.11.1
For more information
Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-25668 changed 2025-02-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gw97-ff7c-9v96 changed 2026-06-29 | CC-BY-4.0 |
| NVD | CVE-2023-25668 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-548 changed 2026-07-01 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-549 changed 2026-07-01 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-550 changed 2026-07-01 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-TENSORFLOW-2023-25668 changed 2026-09-08 | Apache-2.0 |