Input validation error in TensorFlow - CVE-2021-29531

 

Input validation error in TensorFlow - CVE-2021-29531

Published: May 13, 2021 / Updated: May 4, 2026


Vulnerability identifier: #VU129360
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2021-29531
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: TensorFlow
Affected software:
TensorFlow

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to improper input validation in tf.raw_ops.EncodePng when encoding an empty input tensor as pixel data. A remote attacker can provide an empty input tensor to trigger process abort and cause a denial of service.

The issue is triggered because an empty tensor results in a null image buffer that reaches a CHECK_NOTNULL assertion in png::WriteImageToBuffer.


How to mitigate CVE-2021-29531

Install security update from vendor's website.

Sources