Division by zero in TensorFlow - CVE-2021-29587
Published: May 13, 2021 / Updated: May 4, 2026
Vulnerability identifier: #VU129305
CSH Severity: Medium
CVSS v4: 6.9 [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]
CVE-ID: CVE-2021-29587
CWE-ID: CWE-369
Exploitation vector: Remote access
Exploit availability:
No public exploit available
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service.
The vulnerability exists due to division by zero in the SpaceToDepth TFLite operator Prepare step when parsing a crafted model. A remote attacker can supply a model with a zero block_size value to cause a denial of service.
Affected software
TensorFlow
How to mitigate CVE-2021-29587
Install security update from vendor's website.
TensorFlow - addressed in versions 2.1.4, 2.2.3, 2.3.3, 2.4.2