{"id":"CVE-2021-29568","published":"2021-05-14T19:16:41Z","modified":"2024-08-03T22:11:05Z","title":"Reference binding to null in `ParameterizedTruncatedNormal`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger undefined behavior by binding to null pointer in `tf.raw_ops.ParameterizedTruncatedNormal`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/3f6fe4dfef6f57e768260b48166c27d148f3015f/tensorflow/core/kernels/parameterized_truncated_normal_op.cc#L630) does not validate input arguments before accessing the first element of `shape`. If `shape` argument is empty, then `shape_tensor.flat<T>()` is an empty array. 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.5,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00197,"percentile":0.05366,"provenance":"source"},"cwes":[{"id":"CWE-824","name":"Access of Uninitialized Pointer"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-4p4p-www8-8fv9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/5e52ef5a461570cfb68f3bdbbebfe972cb4e0fd8","tags":["x_refsource_MISC"]}],"priority":{"score":2.8,"factors":[{"name":"EPSS percentile","points":1.07},{"name":"CVSS severity","points":1.75}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":["< 2.1.4",">= 2.2.0, < 2.2.3",">= 2.3.0, < 2.3.3",">= 2.4.0, < 2.4.2"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-4p4p-www8-8fv9","PYSEC-2021-205"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-4p4p-www8-8fv9","PYSEC-2021-496"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.1.4",">=2.2.0, <2.2.3",">=2.3.0, <2.3.3",">=2.4.0, <2.4.2","<2.2.0rc0",">=2.2.0, <2.3.0rc0",">=2.3.0, <2.3.4",">=2.4.0, <2.4.3"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0","2.3.0rc0","2.3.4","2.4.3"],"from":["GHSA-4p4p-www8-8fv9","PYSEC-2021-694"],"provenance":"source"}],"summary":{"text":"The reference binding to null in TensorFlow's ParameterizedTruncatedNormal kernel (tf.raw_ops.ParameterizedTruncatedNormal) occurs because the implementation accesses the first element of the shape argument without validating its contents, so an empty shape yields an empty array that is then dereferenced. An attacker with local access and low privileges can trigger this undefined behavior by supplying an empty shape argument, with high attack complexity and no user interaction required, resulting in a low-impact availability effect.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:57Z"},"euvd":{"id":"EUVD-2021-0309","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2020-15202","parents":[{"from":"CVE-2020-15202","to":"CVE-2021-29568","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/parameterized_truncated_normal_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/27b417360cbd671ef55915e4bb6bb06af8b8a832","https://github.com/tensorflow/tensorflow/commit/ca8c013b5e97b1373b3bb1c97ea655e69f31a575","https://github.com/tensorflow/tensorflow/commit/5e52ef5a461570cfb68f3bdbbebfe972cb4e0fd8"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2021-29568","to":"CVE-2022-35984","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/parameterized_truncated_normal_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/5e52ef5a461570cfb68f3bdbbebfe972cb4e0fd8","https://github.com/tensorflow/tensorflow/commit/72180be03447a10810edca700cbc9af690dfeb51"],"basis":"shared function","functions":["ParameterizedTruncatedNormalOp"]}]}]}}