CVE-2020-15200: Heap Buffer Overflow in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

25/09/2020
Yes i
High
5.9

CVE-2020-15200: In Tensorflow before version 2.3.1, the RaggedCountSparseOutput implementation does not validate that the input arguments form a valid ragged tensor. Affects tensorflow across 2 version ranges.

< 2.3.1 < 3cbb917b4714766030b28eba9fb41bb97ce9ee02

Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓

Also tracked for

The same CVE-2020-15200 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

TensorFlow is an open-source machine learning framework widely used for developing and training various deep learning models. It provides a comprehensive ecosystem of tools, libraries, and resources for building and deploying machine learning applications. However, prior to version 2.3.1, TensorFlow is vulnerable to a heap buffer overflow in the RaggedCountSparseOutput implementation.

Vulnerability Detail

The vulnerability arises due to the lack of validation in the RaggedCountSparseOutput implementation of TensorFlow. Specifically, the code fails to verify if the input arguments form a valid ragged tensor. This results in a situation where the values in the splits tensor do not generate a valid partitioning of the values tensor. Consequently, a heap buffer overflow can occur. An important detail is that a BatchedMap in TensorFlow is equivalent to a vector where each element is a hashmap. However, if the first element of splits_values is not 0, the batch_idx will never be 1, leading to the absence of a hashmap at index 0 in per_batch_counts. Attempting to access this absent hashmap in user code triggers a segmentation fault.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3cbb917b4714766030b28eba9fb41bb97ce9ee02

This is the first release that contains the fix.

pip install --upgrade "tensorflow==3cbb917b4714766030b28eba9fb41bb97ce9ee02"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

In conclusion, TensorFlow versions prior to 2.3.1 are vulnerable to a heap buffer overflow in the RaggedCountSparseOutput implementation. This vulnerability can lead to a segmentation fault and crashing of the application. It is crucial to update TensorFlow to version 2.3.1 or later to mitigate the issue. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow →

Share this vulnerability

FAQ

TensorFlow is an open-source machine learning framework used for developing and training deep learning models.

This vulnerability can lead to a heap buffer overflow, potentially resulting in a segmentation fault and crashing of the application using TensorFlow.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

Yes, the vulnerability is fixed in TensorFlow version 2.3.1. It is recommended to update to this version or later to mitigate the issue.

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 version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3cbb917b4714766030b28eba9fb41bb97ce9ee02

This is the first release that contains the fix.

pip install --upgrade "tensorflow==3cbb917b4714766030b28eba9fb41bb97ce9ee02"

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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