PyPI: tensorflow-macos

CVE-2021-41197

Safety vulnerability ID: SFTY-20211105-09792

Safety legacy ID: pyup.io-58359

Affected versions of Tensorflow-macos allow tensors to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an 'int64_t'. If an overflow occurs, 'MultiplyWithoutOverflow' would return a negative result. In the majority of TensorFlow codebase this then results in a 'CHECK'-failure. Newer constructs exist which return a 'Status' instead of crashing the binary. This is a similar issue to CVE-2021-29584.

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

Overview

Crashes due to overflow and `CHECK`-fail in ops with large tensor shapes

Advisory

Affected versions of Tensorflow-macos allow tensors to have a large number of dimensions and each dimension can be as large as desired. However, the total number of elements in a tensor must fit within an 'int64_t'. If an overflow occurs, 'MultiplyWithoutOverflow' would return a negative result. In the majority of TensorFlow codebase this then results in a 'CHECK'-failure. Newer constructs exist which return a 'Status' instead of crashing the binary. This is a similar issue to CVE-2021-29584.

Affected Package

Affecting tensorflow-macos package, versions<2.6.4>=2.7.0rc0,<2.7.2>=2.8.0rc0,<2.8.1>=2.9.0rc0,<2.9.0

Also affects

---

How to Fix

Upgradetensorflow-macosto2.9.02.9.02.9.02.9.0or 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