CVE-2020-26268: Write to immutable memory region in TensorFlow

tensorflow Updated 02 Oct 2025

Summary

10/12/2020
Yes i
Moderate
4.4

CVE-2020-26268: Write to immutable memory region in TensorFlow. Affects tensorflow across 5 version ranges.

< 1.15.5 >= 2.0.0, < 2.0.4 >= 2.1.0, < 2.1.3 >= 2.2.0, < 2.2.2 >= 2.3.0, < 2.3.2

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-26268 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 Penetration testing for web, API and mobile 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 for building and deploying machine learning models. TensorFlow allows users to define and execute computational graphs, making it suitable for a wide range of applications in artificial intelligence and deep learning. However, a vulnerability has been discovered in TensorFlow that allows writing to an immutable memory region, potentially leading to crashes or other unexpected behavior.

Vulnerability Detail

The vulnerability, identified as CVE-2020-26268, exists in the tf.raw_ops.ImmutableConst operation of TensorFlow. This operation is responsible for returning a constant tensor created from a memory mapped file, which is assumed to be immutable. However, if the type of the tensor is not an integral type, the operation crashes the Python interpreter as it attempts to write to the memory area. This can result in a segmentation fault and unexpected termination of the program. The vulnerability has a CVSS score of 4.4.

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.5 1.15.5
    pip install --upgrade "tensorflow==1.15.5"
  • >= 2.0.0, < 2.0.4 2.0.4
    pip install --upgrade "tensorflow==2.0.4"
  • >= 2.1.0, < 2.1.3 2.1.3
    pip install --upgrade "tensorflow==2.1.3"
  • >= 2.2.0, < 2.2.2 2.2.2
    pip install --upgrade "tensorflow==2.2.2"
  • >= 2.3.0, < 2.3.2 2.3.2
    pip install --upgrade "tensorflow==2.3.2"

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, users can avoid using the tf.raw_ops.ImmutableConst operation with non-integral tensor types. If possible, consider using alternative operations or approaches that do not rely on memory mapped files. Here is an example of how to create a constant tensor without using the vulnerable operation:

import tensorflow as tf

# Create a constant tensor directly
tensor = tf.constant(['value1', 'value2'], dtype=tf.string)

By directly creating a constant tensor, you can bypass the vulnerable operation and avoid the associated risks.

Conclusion

The vulnerability in TensorFlow that allows writing to an immutable memory region has been addressed by the TensorFlow team. Users are advised to update their installations to the latest version once the fix is released. Regularly checking for updates and applying them promptly is crucial for maintaining the security and stability of TensorFlow applications. 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.

The vulnerability allows writing to an immutable memory region in TensorFlow, which can lead to crashes or unexpected behavior, such as segmentation faults.

To fix this vulnerability, update your TensorFlow installation to the latest version once the fix is released. Regularly check for updates and apply them promptly.

Yes, you can avoid using the vulnerable tf.raw_ops.ImmutableConst operation with non-integral tensor types. Create constant tensors directly instead.

This vulnerability was reported by members of the Aivul Team from Qihoo 360.

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.5 1.15.5
    pip install --upgrade "tensorflow==1.15.5"
  • >= 2.0.0, < 2.0.4 2.0.4
    pip install --upgrade "tensorflow==2.0.4"
  • >= 2.1.0, < 2.1.3 2.1.3
    pip install --upgrade "tensorflow==2.1.3"
  • >= 2.2.0, < 2.2.2 2.2.2
    pip install --upgrade "tensorflow==2.2.2"
  • >= 2.3.0, < 2.3.2 2.3.2
    pip install --upgrade "tensorflow==2.3.2"

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