CVE-2020-15203: TensorFlow Format String Vulnerability
Summary
CVE-2020-15203: Denial of Service in Tensorflow. Affects tensorflow across 5 version ranges.
< 1.15.4
>= 2.0.0, < 2.0.3
>= 2.1.0, < 2.1.2
>= 2.2.0, < 2.2.1
>= 2.3.0, < 2.3.1
Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- tensorflow · PyPI
- tensorflow-cpu · PyPI
- tensorflow-gpu · PyPI
- tensorflow · PyPI
The same CVE-2020-15203 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning models. TensorFlow is widely used in various domains, including research, industry, and academia. However, versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 are vulnerable to a format string vulnerability.
Vulnerability Detail
The vulnerability arises from the way the fill argument of tf.strings.as_string is controlled. An attacker can exploit this vulnerability by manipulating the fill argument to trigger a format string vulnerability. This can lead to a segmentation fault and potentially enable arbitrary code execution. The issue has been patched in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 1.15.41.15.4 -
>= 2.0.0, < 2.0.32.0.3 -
>= 2.1.0, < 2.1.22.1.2 -
>= 2.2.0, < 2.2.12.2.1 -
>= 2.3.0, < 2.3.12.3.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a workaround, if updating TensorFlow is not immediately feasible, it is recommended to avoid using the tf.strings.as_string function with user-controlled input. By ensuring that the fill argument is not influenced by untrusted sources, the risk of exploitation can be reduced.
Conclusion
The format string vulnerability in TensorFlow versions before 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1 can be exploited by manipulating the fill argument of tf.strings.as_string. It is crucial to update TensorFlow to one of the patched versions or apply the recommended workaround to mitigate the risk. For further assistance on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for tensorflow →
FAQ
TensorFlow is an open-source machine learning framework developed by Google. It provides tools and resources for building and deploying machine learning models.
A format string vulnerability occurs when user-controlled input is used in a format string function without proper validation or sanitization. This can lead to memory corruption, crashes, or even arbitrary code execution.
By manipulating the fill argument of tf.strings.as_string, an attacker can trigger a format string vulnerability and potentially execute arbitrary code.
Yes, the vulnerability has been patched in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1. It is recommended to update to one of these versions to mitigate the risk.
As a temporary workaround, it is advised to avoid using the tf.strings.as_string function with untrusted input. By ensuring that the fill argument is not influenced by user-controlled data, the vulnerability can be mitigated.
Related vulnerabilities
Recent vulnerabilities recorded for tensorflow.