PyPI: tensorflow-gpu

CVE-2021-41217

Safety vulnerability ID: SFTY-20211105-43021

Safety legacy ID: pyup.io-56100

Tensorflow-gpu versions 2.4.4, 2.5.2 and 2.6.1 include a fix for CVE-2021-41217: In affected versions, the process of building the control flow graph for a TensorFlow model is vulnerable to a null pointer exception when nodes that should be paired are not. This occurs because the code assumes that the first node in the pairing (e.g., an 'Enter' node) always exists when encountering the second node (e.g., an 'Exit' node). When this is not the case, 'parent' is 'nullptr' so dereferencing it causes a crash. The fix is included in TensorFlow 2.7.0. https://github.com/tensorflow/tensorflow/security/advisories/GHSA-5crj-c72x-m7gq https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

Null pointer exception when `Exit` node is not preceded by `Enter` op

Advisory

Tensorflow-gpu versions 2.4.4, 2.5.2 and 2.6.1 include a fix for CVE-2021-41217: In affected versions, the process of building the control flow graph for a TensorFlow model is vulnerable to a null pointer exception when nodes that should be paired are not. This occurs because the code assumes that the first node in the pairing (e.g., an 'Enter' node) always exists when encountering the second node (e.g., an 'Exit' node). When this is not the case, 'parent' is 'nullptr' so dereferencing it causes a crash. The fix is included in TensorFlow 2.7.0. https://github.com/tensorflow/tensorflow/security/advisories/GHSA-5crj-c72x-m7gq https://github.com/tensorflow/tensorflow/commit/05cbebd3c6bb8f517a158b0155debb8df79017ff

Affected Package

Affecting tensorflow-gpu package, versions<2.4.4>=2.5.0rc0,<2.5.2>=2.6.0rc0,<2.6.1

Also affects

---

How to Fix

Upgradetensorflow-gputo2.4.42.5.22.6.1or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more