Denial of Service (DoS) Affecting tensorflow/tensorflow package, versions [,2.1.4)[2.2.0,2.2.3)[2.3.0,2.3.3)[2.4.0,2.4.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-TENSORFLOWTENSORFLOW-2333480
  • published12 Jan 2022
  • disclosed14 May 2021
  • creditUnknown

Introduced: 14 May 2021

CVE-2021-29539  (opens in a new tab)
CWE-681  (opens in a new tab)

How to fix?

Upgrade tensorflow/tensorflow to version 2.1.4, 2.2.3, 2.3.3, 2.4.2 or higher.

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS). TensorFlow is an end-to-end open source platform for machine learning. Calling tf.raw_ops.ImmutableConst(https://www.tensorflow.org/api_docs/python/tf/raw_ops/ImmutableConst) with a dtype of tf.resource or tf.variant results in a segfault in the implementation as code assumes that the tensor contents are pure scalars. We have patched the issue in 4f663d4b8f0bec1b48da6fa091a7d29609980fa4 and will release TensorFlow 2.5.0 containing the patch. TensorFlow nightly packages after this commit will also have the issue resolved. If using tf.raw_ops.ImmutableConst in code, you can prevent the segfault by inserting a filter for the dtype argument.

CVSS Scores

version 3.1