Skip to main content
Network Thinking Solutions Logo

CVE-2021-29518

Session operations in eager mode lead to null pointer dereferences

All CVEs
CVE-2021-29518Published 5/14/2021

Session operations in eager mode lead to null pointer dereferences

Vendor advisory
CVSS7.8High

Overview

TensorFlow is an end-to-end open source platform for machine learning. In eager mode (default in TF 2.0 and later), session operations are invalid. However, users could still call the raw ops associated with them and trigger a null pointer dereference. The implementation(https://github.com/tensorflow/tensorflow/blob/eebb96c2830d48597d055d247c0e9aebaea94cd5/tensorflow/core/kernels/session_ops.cc#L104) dereferences the session state pointer without checking if it is valid. Thus, in eager mode, `ctx->session_state()` is nullptr and the call of the member function is undefined behavior. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

Published
5/14/2021
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
tensorflow
google
< 2.1.4

Verify advisory

Source
tensorflow
google
≥ 2.2.0, < 2.2.3

Verify advisory

Source
tensorflow
google
≥ 2.3.0, < 2.3.3

Verify advisory

Source
tensorflow
google
≥ 2.4.0, < 2.4.2

Verify advisory

Source
tensorflow
tensorflow
< 2.1.4

Verify advisory

Source
tensorflow
tensorflow
>= 2.2.0, < 2.2.3

Verify advisory

Source
tensorflow
tensorflow
>= 2.3.0, < 2.3.3

Verify advisory

Source
tensorflow
tensorflow
>= 2.4.0, < 2.4.2

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 7.8. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.