Security advisory
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-41215
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:38 UTC · Revision 1
Source evidence
TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
osv:CVE-2021-41215
Complete source record
{
"id": "bda5d543b30e676e196c6bd78c067bf14644851c72af91a0e49dfa7beebf0c07",
"url": "https://osv.dev/vulnerability/CVE-2021-41215",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-41215",
"summary": "TensorFlow is an open source platform for machine learning. In affected versions the shape inference code for `DeserializeSparse` can trigger a null pointer dereference. This is because the shape inference function assumes that the `serialize_sparse` tensor is a tensor with positive rank (and having `3` as the last dimension). The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.",
"evidence": "osv:CVE-2021-41215",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-41215",
"aliases": [
"BIT-tensorflow-2021-41215",
"CVE-2021-41215",
"GHSA-x3v8-c8qx-3j3r",
"PYSEC-2021-407",
"PYSEC-2021-624",
"PYSEC-2021-822"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/tensorflow/tensorflow",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "64918868e2154b06c7479347a59a4230f785e9fa"
},
{
"introduced": "a4dfb8d1a71385bd6d122e4f27f86dcebb96712d"
},
{
"fixed": "957590ea15cc03ee2e00fc61934647d54836676f"
},
{
"introduced": "919f693420e35d00c8d0a42100837ae3718f7927"
},
{
"last_affected": "919f693420e35d00c8d0a42100837ae3718f7927"
},
{
"fixed": "d3738dd70f1c9ceb547258cbb82d853da8771850"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.4.4"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.5.0"
},
{
"fixed": "2.5.2"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:google:tensorflow:2.6.0:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.6.0"
},
{
"last_affected": "2.6.0"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "d3738dd70f1c9ceb547258cbb82d853da8771850"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"2.6.0",
"v2.4.3",
"v2.6.0",
"v2.5.1",
"v2.4.2",
"v2.5.0",
"v2.4.1",
"v2.4.0",
"v2.4.0-rc4",
"v2.4.0-rc3",
"v2.4.0-rc2",
"v2.4.0-rc1",
"v2.4.0-rc0",
"v1.12.1",
"v1.9.0-rc2",
"v1.6.0-rc1",
"v1.1.0-rc2",
"v1.1.0-rc1",
"0.6.0",
"0.5.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41215.json",
"vanir_signatures": [
{
"id": "CVE-2021-41215-0d794c4e",
"digest": {
"threshold": 0.9,
"line_hashes": [
"325222962699495185038324433408192320387",
"135717973706146516842869404431662552576",
"173745391061575972182160269700888804397",
"260399642956101948539994592885380092829",
"163510374096494953302881300139892006138",
"316946323388347678857337301130265990245"
]
},
"source": "https://github.com/tensorflow/tensorflow/commit/d3738dd70f1c9ceb547258cbb82d853da8771850",
"target": {
"file": "tensorflow/core/ops/sparse_ops.cc"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:10:24Z"
}
}
],
"modified": "2026-10-20T14:10:24.371206707Z",
"provider": "osv",
"references": [
"https://github.com/tensorflow/tensorflow/commit/d3738dd70f1c9ceb547258cbb82d853da8771850",
"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-x3v8-c8qx-3j3r"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-41215",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388602,
"published_at": "2021-11-05T21:15:09.003+00:00"
}