Improper locking in TensorFlow - CVE-2021-41213

 

Improper locking in TensorFlow - CVE-2021-41213

Published: November 5, 2021 / Updated: May 3, 2026


Vulnerability identifier: #VU129193
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2021-41213
CWE-ID: CWE-667
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 use of a non-reentrant lock in the tf.function API when loading a model containing mutually recursive functions and calling a recursive tf.function. A remote attacker can cause a user to load a crafted model to cause a denial of service.

This issue is triggered when two tf.function-decorated Python functions are mutually recursive.


How to mitigate CVE-2021-41213

Install security update from vendor's website.

Sources