CVE-2020-15196: TensorFlow CPU - Heap Buffer Overflow in SparseCountSparseOutput and RaggedCountSparseOutput Implementations

tensorflow-cpu Updated 02 Oct 2025

Summary

25/09/2020
Yes i
Unrated
Not published

CVE-2020-15196: In Tensorflow version 2.3.0, the SparseCountSparseOutput and RaggedCountSparseOutput implementations don't validate that the weights tensor has the same shape as the data. Affects tensorflow-cpu across 2 version ranges.

< 2.3.1 < 3cbb917b4714766030b28eba9fb41bb97ce9ee02

Fixed in 3cbb917b4714766030b28eba9fb41bb97ce9ee02. How to fix ↓

Also tracked for

The same CVE-2020-15196 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

TensorFlow is an open-source machine learning framework widely used for developing and training deep learning models. It provides a comprehensive ecosystem of tools, libraries, and community resources to facilitate the development of artificial intelligence applications. TensorFlow CPU is a specific package within TensorFlow that focuses on providing CPU support for TensorFlow operations. It allows users to run TensorFlow models efficiently on CPUs without the need for GPU acceleration.

Vulnerability Detail

The vulnerability (CVE-2020-15196) exists in TensorFlow version 2.3.0 and affects the SparseCountSparseOutput and RaggedCountSparseOutput implementations. These implementations fail to validate the shape of the weights tensor, which should match the shape of the data tensor. While the DenseCountSparseOutput implementation includes this validation, the sparse and ragged count implementations do not. As a result, if a user passes fewer weights than the values for the tensors, it can lead to a read from outside the bounds of the heap buffer allocated for the weights. This can potentially result in a heap buffer overflow, leading to memory corruption and possible exploitation by an attacker. The issue has been patched in commit 3cbb917b4714766030b28eba9fb41bb97ce9ee02 and is released in TensorFlow version 2.3.1.

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==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-cpu==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. Users are advised to apply the fix by upgrading to the patched version of TensorFlow CPU.

Conclusion

The vulnerability (CVE-2020-15196) in TensorFlow CPU's SparseCountSparseOutput and RaggedCountSparseOutput implementations can lead to a heap buffer overflow and potential memory corruption. Users should upgrade to TensorFlow CPU version 2.3.1 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for tensorflow-cpu →

Share this vulnerability

FAQ

TensorFlow CPU is a package within TensorFlow that provides CPU support for TensorFlow operations, allowing users to run TensorFlow models efficiently on CPUs.

This vulnerability can lead to a heap buffer overflow in the SparseCountSparseOutput and RaggedCountSparseOutput implementations of TensorFlow CPU. It can result in memory corruption and potential exploitation by an attacker.

To fix this vulnerability, users should upgrade their TensorFlow CPU package to version 2.3.1 or later.

There is no specific workaround mentioned for this vulnerability. Users are advised to apply the fix by upgrading to the patched version of TensorFlow CPU.

For more information about this vulnerability, you can refer to the official TensorFlow documentation or the CVE entry (CVE-2020-15196).

Related vulnerabilities

Recent vulnerabilities recorded for tensorflow-cpu.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 2.21.0 as of 22 Oct 2026

pip install --upgrade "tensorflow-cpu==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-cpu==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