CVE-2021-29543
JSON

2.5low

CHECK-fail in `CTCGreedyDecoder`

Severity
2.5low CVSS:3.1 by GitHub_M
Exploit likelihood
0.19% (higher than 8% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fphq-gw9m-ghrvBIT-TENSORFLOW-2021-29543PYSEC-2021-180PYSEC-2021-471PYSEC-2021-669

Description

TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in `tf.raw_ops.CTCGreedyDecoder`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1615440b17b364b875eb06f43d087381f1460a65/tensorflow/core/kernels/ctc_decoder_ops.cc#L37-L50) has a `CHECK_LT` inserted to validate some invariants. When this condition is false, the program aborts, instead of returning a valid error to the user. This abnormal termination can be weaponized in denial of service attacks. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

Affected

Product or packageVersionsReported by
tensorflow tensorflow< 2.1.4, >= 2.2.0, < 2.2.3, >= 2.3.0, < 2.3.3, >= 2.4.0, < 2.4.2CVE List
tensorflow (PyPI)before 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before ea3b43e98c32c97b35d52b4c66f9107452ca8fb2, before 2.2.0rc0, from 2.2.0 before 2.3.0rc0, from 2.3.0 before 2.3.4 and 1 moreGitHub Advisory Database, PyPA Advisory Database
tensorflow-cpu (PyPI)before 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before ea3b43e98c32c97b35d52b4c66f9107452ca8fb2, before 2.2.0rc0, from 2.2.0 before 2.3.0rc0, from 2.3.0 before 2.3.4 and 1 moreGitHub Advisory Database, PyPA Advisory Database
tensorflow-gpu (PyPI)before 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2, before ea3b43e98c32c97b35d52b4c66f9107452ca8fb2, before 2.2.0rc0, from 2.2.0 before 2.3.0rc0, from 2.3.0 before 2.3.4 and 1 moreGitHub Advisory Database, PyPA Advisory Database
google tensorflowbefore 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2NVD
tensorflow (Bitnami)before 2.1.4, from 2.2.0 before 2.2.3, from 2.3.0 before 2.3.3, from 2.4.0 before 2.4.2Bitnami Vulnerability Database

All scores

GitHub_M2.5low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
GitHub2.5low CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L
GitHublow CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD2.1low CVSS:2.0AV:L/AC:L/Au:N/C:N/I:N/A:P
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a denial of service via a `CHECK`-fail in `tf.raw_ops.CTCGreedyDecoder`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1615440b17b364b875eb06f43d087381f1460a65/tensorflow/core/kernels/ctc_decoder_ops.cc#L37-L50) has a `CHECK_LT` inserted to validate some invariants. When this condition is false, the program aborts, instead of returning a valid error to the user. This abnormal termination can be weaponized in denial of service attacks. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

GitHub Advisory Database
Impact

An attacker can trigger a denial of service via a CHECK-fail in tf.raw_ops.CTCGreedyDecoder:

import tensorflow as tf

inputs = tf.constant([], shape=[18, 2, 0], dtype=tf.float32)
sequence_length = tf.constant([-100, 17], shape=[2], dtype=tf.int32)
merge_repeated = False

tf.raw_ops.CTCGreedyDecoder(inputs=inputs, sequence_length=sequence_length, merge_repeated=merge_repeated)

This is because the implementation has a CHECK_LT inserted to validate some invariants. When this condition is false, the program aborts, instead of returning a valid error to the user. This abnormal termination can be weaponized in denial of service attacks.

Patches

We have patched the issue in GitHub commit ea3b43e98c32c97b35d52b4c66f9107452ca8fb2.

The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

For more information

Please consult our security guide for more information regarding the security model and how to contact us with issues and questions.

Attribution

This vulnerability has been reported by Yakun Zhang and Ying Wang of Baidu X-Team.

NVD (es)

TensorFlow es una plataforma de código abierto de extremo a extremo para el aprendizaje automático.&#xa0;Un atacante puede desencadenar una denegación de servicio por medio de "CHECK" en "tf.raw_ops.CTCGreedyDecoder".&#xa0;Esto es debido a que la implementación (https://github.com/tensorflow/tensorflow/blob/1615440b17b364b875eb06f43d087381f1460a65/tensorflow/core/kernels/ctc_decoder_ops.cc#L37-L50) presenta un "CHECK_LT" insertado para comprobar algunas invariantes.&#xa0;Cuando esta condición es falsa, el programa aborta, en lugar de devolver un error válido al usuario.&#xa0;Esta terminación anormal puede ser usada como arma en ataques de denegación de servicio.&#xa0;La corrección será incluida en TensorFlow versión 2.5.0.&#xa0;También seleccionaremos este commit en TensorFlow versión 2.4.2, TensorFlow versión 2.3.3, TensorFlow versión 2.2.3 y TensorFlow versión 2.1.4, ya que estos también están afectados y aún están en el rango compatible

References

Sources

SourceRecordLicence
CVE ListCVE-2021-29543 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-fphq-gw9m-ghrv changed 2026-07-08CC-BY-4.0
NVDCVE-2021-29543 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-180 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2021-471 changed 2023-12-06CC-BY-4.0
PyPA Advisory DatabasePYSEC-2021-669 changed 2023-12-06CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-TENSORFLOW-2021-29543 changed 2026-09-08Apache-2.0