Security advisory
TensorFlow is an open source platform for machine learning. In affected versions during TensorFlow's Grappler optimizer phase, constant folding might attempt to deep copy a resource tensor. This results in a segfault, as these tensors are supposed to not change. 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-41204
- 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 during TensorFlow's Grappler optimizer phase, constant folding might attempt to deep copy a resource tensor. This results in a segfault, as these tensors are supposed to not change. 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-41204
Complete source record
{
"id": "e61b4a3020476d41edfc3e7f0a0bce4d004f29b575565986fa7ab66d1df248bb",
"url": "https://osv.dev/vulnerability/CVE-2021-41204",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-41204",
"summary": "TensorFlow is an open source platform for machine learning. In affected versions during TensorFlow's Grappler optimizer phase, constant folding might attempt to deep copy a resource tensor. This results in a segfault, as these tensors are supposed to not change. 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-41204",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-41204",
"aliases": [
"BIT-tensorflow-2021-41204",
"CVE-2021-41204",
"GHSA-786j-5qwq-r36x",
"PYSEC-2021-397",
"PYSEC-2021-614",
"PYSEC-2021-812"
],
"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"
},
{
"fixed": "3aa40c3ce9d16eae296f086bc4ac4d62deb2affc"
},
{
"fixed": "7731e8dfbe4a56773be5dc94d631611211156659"
}
],
"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:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.6.0"
},
{
"fixed": "2.6.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "7731e8dfbe4a56773be5dc94d631611211156659"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"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-41204.json",
"vanir_signatures": [
{
"id": "CVE-2021-41204-86d0e2eb",
"digest": {
"threshold": 0.9,
"line_hashes": [
"340192475858171499556994716822112153974",
"144370012479399400806459244462838248318",
"117334905300860636471405629315121171491",
"11496510752320477648095477139136791662",
"313860338417748766865704113121603795141",
"251985050568311480197794104915522851374",
"329634738273150470144459714366448906960",
"244120548168535016769380326369981913228"
]
},
"source": "https://github.com/tensorflow/tensorflow/commit/7731e8dfbe4a56773be5dc94d631611211156659",
"target": {
"file": "tensorflow/core/common_runtime/constant_folding.cc"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:10:26Z"
}
}
],
"modified": "2026-10-20T14:10:26.756005462Z",
"provider": "osv",
"references": [
"https://github.com/tensorflow/tensorflow/commit/7731e8dfbe4a56773be5dc94d631611211156659",
"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-786j-5qwq-r36x"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-41204",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388608,
"published_at": "2021-11-05T21:15:08.683+00:00"
}