Improper locking in TensorFlow - CVE-2021-41213
Published: November 5, 2021 / Updated: May 3, 2026
TensorFlow
TensorFlow
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.