CVE-2020-15203: Format String Vulnerability in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
High
7.5

CVE-2020-15203: In Tensorflow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, by controlling the fill argument of tf.strings.as_string, a malicious attacker is able to trigger a format string vulnerability due to the way the inte... Affects tensorflow across 6 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 < 33be22c65d86256e6826666662e40dbdfe70ee83

Fixed in 5 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

TensorFlow is an open-source machine learning framework developed by Google. It provides a comprehensive ecosystem of tools, libraries, and community resources that enable researchers and developers to build and deploy machine learning models. TensorFlow is widely used in various domains, including computer vision, natural language processing, and deep learning. 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 (CVE-2020-15203) arises due to the improper handling of the fill argument in the tf.strings.as_string function. An attacker can exploit this vulnerability by controlling the fill argument and triggering a format string vulnerability. This can lead to a segmentation fault and potentially allow the attacker to execute arbitrary code or cause a denial of service. The vulnerability has been patched in commit 33be22c65d86256e6826666662e40dbdfe70ee83 and is addressed in TensorFlow versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, and 2.3.1.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.15.4 1.15.4
    pip install --upgrade "tensorflow==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow==2.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

There is no known workaround for this vulnerability. It is crucial to update to the patched versions as soon as possible to mitigate the risk.

Conclusion

The format string vulnerability in TensorFlow (CVE-2020-15203) can be exploited by controlling the fill argument of the tf.strings.as_string function. It is crucial to update to the patched versions (1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1) to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework developed by Google. It provides tools and libraries for building and deploying machine learning models.

A format string vulnerability occurs when a program uses user-supplied input as the format string parameter in a formatted printing function, such as printf. If the input is not properly validated, an attacker can exploit this vulnerability to execute arbitrary code or cause a denial of service.

The format string vulnerability in TensorFlow can be exploited by controlling the fill argument of the tf.strings.as_string function. By providing a malicious format string, an attacker can trigger the vulnerability and potentially execute arbitrary code or cause a segmentation fault.

Yes, the vulnerability has been patched in commit 33be22c65d86256e6826666662e40dbdfe70ee83. Users should update their TensorFlow installation to versions 1.15.4, 2.0.3, 2.1.2, 2.2.1, or 2.3.1 to mitigate the risk.

No, there are no known workarounds for this vulnerability. It is recommended to update to the patched versions of TensorFlow to ensure the security of the system.

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow==2.21.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.15.4 1.15.4
    pip install --upgrade "tensorflow==1.15.4"
  • >= 2.0.0, < 2.0.3 2.0.3
    pip install --upgrade "tensorflow==2.0.3"
  • >= 2.1.0, < 2.1.2 2.1.2
    pip install --upgrade "tensorflow==2.1.2"
  • >= 2.2.0, < 2.2.1 2.2.1
    pip install --upgrade "tensorflow==2.2.1"
  • >= 2.3.0, < 2.3.1 2.3.1
    pip install --upgrade "tensorflow==2.3.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback