Appsecure logo

CVE-2021-37649: High Vulnerability in Google TensorFlow

A high-severity vulnerability in Google TensorFlow allows local attackers to trigger a null pointer dereference in `tf.raw_ops.UncompressElement`. Immediate patching is required to mitigate risks associated with this flaw.

HIGHCVSS 7.7 · Published August 12, 2021

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

The vulnerability identified as CVE-2021-37649 affects Google TensorFlow, an open-source platform widely used for machine learning. This vulnerability allows local attackers to exploit the `tf.raw_ops.UncompressElement` function, leading to a potential null pointer dereference due to a lack of checks to validate the presence of a `CompressedElement` in a `Variant` tensor. The absence of this check allows an attacker to trigger a fault in the application, which could lead to application crashes or unexpected behavior.

With a CVSS score of 7.7, classified as high severity, this vulnerability poses significant risks to organizations using TensorFlow. The attack vector is local, and the complexity is low, meaning that the exploitation requires minimal effort from the attacker. The urgency for defenders is high, as the flaw can lead to integrity and availability impacts, making it crucial for organizations to patch their TensorFlow installations promptly.

The issue was publicly disclosed on August 12, 2021, and has been addressed in commit 7bdf50bb4f5c54a4997c379092888546c97c3ebd on GitHub. The fix is included in TensorFlow 2.6.0 and is also backported to earlier versions that remain in the supported range. Organizations running affected versions should prioritize upgrading or implementing the patch to mitigate this vulnerability.

Organizations should prioritize patching immediately. The implications of this vulnerability can lead to severe operational disruptions, and it is vital to ensure that systems are secured against potential exploitation.

Vulnerability Details

This vulnerability allows for a null pointer dereference in the TensorFlow library, specifically in the `tf.raw_ops.UncompressElement` function. The absence of checks for the existence of a `CompressedElement` within a `Variant` tensor leads to dereferencing a null pointer, which can cause application crashes.

The CVSS score of 7.7 indicates a high severity level, which signifies a serious risk to systems utilizing this software. The vulnerability was published on August 12, 2021, and has a CWE classification of CWE-476, which corresponds to NULL Pointer Dereference.

Technical Analysis

The root cause of this vulnerability stems from insufficient checks in the code that handles the `Variant` tensor. When the code attempts to obtain a pointer to a `CompressedElement` from a `Variant`, it does not verify whether this pointer is valid, resulting in dereferencing a null pointer if the `CompressedElement` is not present.

The attack vector is local, meaning an attacker must have access to the system where TensorFlow is running. The attack complexity is classified as low, requiring no special privileges or user interaction. If exploited, the impacts include high integrity and availability impacts, as the application may crash or behave unexpectedly, leading to potential data loss or service interruption.

Risk & Impact Analysis

Risk to organizations includes potential application crashes and data integrity issues, which can affect business operations. Given the high CVSS score, organizations using TensorFlow are at significant risk if they do not apply the necessary patches. The blast radius could be considerable, particularly for applications reliant on TensorFlow for critical machine learning tasks.

Organizations should address this vulnerability in their priority patch cycle. The urgency is underscored by the availability of a fix that has already been implemented in newer versions.

Exploitation Status

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

The affected versions of TensorFlow include all versions from 2.3.0 up to, but not including, 2.3.4, as well as versions 2.4.0 up to, but not including, 2.4.3, and 2.5.0. Additionally, TensorFlow 2.6.0 release candidates (rc0, rc1, and rc2) are also vulnerable.

Mitigation & Remediation

To mitigate this vulnerability, organizations should upgrade to TensorFlow version 2.6.0 or apply the patch from commit 7bdf50bb4f5c54a4997c379092888546c97c3ebd. In case upgrading is not possible, organizations should consider implementing workarounds such as input validation to ensure that compressed inputs are non-empty before processing.

For detailed guidance on securing TensorFlow applications, organizations are encouraged to refer to the application security assessment best practices.

Detection Guidance

Monitoring logs for unexpected behavior or application crashes can help detect exploitation attempts related to this vulnerability. Additionally, organizations should observe system performance anomalies that could indicate misuse of the TensorFlow library.

AppSecure Threat Intelligence Insight

CVE-2021-37649 highlights the importance of rigorous input validation in software development, especially in libraries that manage complex data types. As machine learning applications grow in adoption, vulnerabilities such as these pose significant risks. Organizations should review and enhance their security practices, focusing on comprehensive testing and validation to prevent similar vulnerabilities from arising.

To learn more about application security, refer to our insights on penetration testing methodology, vulnerability management programs, and cloud penetration testing to enhance your organization's security posture.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.