{"id":"CVE-2021-37667","published":"2021-08-12T21:40:10Z","modified":"2024-08-04T01:23:01Z","title":"Reference binding to nullptr in unicode encoding in TensorFlow","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in `tf.raw_ops.UnicodeEncode`. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/unicode_ops.cc#L533-L539) reads the first dimension of the `input_splits` tensor before validating that this tensor is not empty. We have patched the issue in GitHub commit 2e0ee46f1a47675152d3d865797a18358881d7a6. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00173,"percentile":0.07002,"provenance":"source"},"cwes":[{"id":"CWE-824","name":"Access of Uninitialized Pointer"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-w74j-v8xh-3w5h","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/2e0ee46f1a47675152d3d865797a18358881d7a6","tags":["x_refsource_MISC"]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":1.4},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"tensorflow","affectedVersions":[{"vendor":"tensorflow","product":"tensorflow","versions":[">= 2.5.0, < 2.5.1",">= 2.4.0, < 2.4.3","< 2.3.4"]}],"affected":[{"ecosystem":"PyPI","package":"tensorflow","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-w74j-v8xh-3w5h","PYSEC-2021-289"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-cpu","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-w74j-v8xh-3w5h","PYSEC-2021-580"],"provenance":"source"},{"ecosystem":"PyPI","package":"tensorflow-gpu","vulnerableRanges":["<2.3.4",">=2.4.0, <2.4.3",">=2.5.0, <2.5.1",">=2.3.0, <2.3.4"],"patched":["2.3.4","2.4.3","2.5.1"],"from":["GHSA-w74j-v8xh-3w5h","PYSEC-2021-778"],"provenance":"source"}],"summary":{"text":"The flaw is an undefined-behavior bug in TensorFlow's unicode encoding code, specifically in the implementation of tf.raw_ops.UnicodeEncode, where a reference is bound to a null pointer because the first dimension of the input_splits tensor is read before the tensor is checked for being empty. An attacker who can supply input to this operation, which requires local access with low privileges and no user interaction, can trigger that undefined behavior in affected TensorFlow versions.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:02Z"},"euvd":{"id":"EUVD-2021-0393","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29559","parents":[{"from":"CVE-2021-29559","to":"CVE-2021-37667","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/unicode_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/51300ba1cc2f487aefec6e6631fef03b0e08b298","https://github.com/tensorflow/tensorflow/commit/2e0ee46f1a47675152d3d865797a18358881d7a6"],"basis":"shared function","functions":["UnicodeEncodeOp"]}]}]}}