CVE-2023-25668
JSON

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 packageVersionsReported by
tensorflow tensorflow< 2.11.1CVE List
tensorflow (PyPI)before 2.11.1GitHub Advisory Database, PyPA Advisory Database
tensorflow-cpu (PyPI)before 2.11.1GitHub Advisory Database, PyPA Advisory Database
tensorflow-gpu (PyPI)before 2.11.1GitHub Advisory Database, PyPA Advisory Database
google tensorflowbefore 2.12.0NVD
tensorflow (Bitnami)before 2.12.0Bitnami Vulnerability Database

All scores

GitHub_M9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Bitnami Vulnerability Databasecritical rating

Classification

CWE-122CWE-125

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

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

SourceRecordLicence
CVE ListCVE-2023-25668 changed 2025-02-19CVE Terms of Use
GitHub Advisory DatabaseGHSA-gw97-ff7c-9v96 changed 2026-06-29CC-BY-4.0
NVDCVE-2023-25668 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-548 changed 2026-07-01CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-549 changed 2026-07-01CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-550 changed 2026-07-01CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2023-25668 changed 2026-09-08Apache-2.0