{"id":"CVE-2021-29575","published":"2021-05-14T19:16:09Z","modified":"2024-08-03T22:11:06Z","title":"Overflow/denial of service in `tf.raw_ops.ReverseSequence`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.ReverseSequence` allows for stack overflow and/or `CHECK`-fail based denial of service. The implementation(https://github.com/tensorflow/tensorflow/blob/5b3b071975e01f0d250c928b2a8f901cd53b90a7/tensorflow/core/kernels/reverse_sequence_op.cc#L114-L118) fails to validate that `seq_dim` and `batch_dim` arguments are valid. Negative values for `seq_dim` can result in stack overflow or `CHECK`-failure, depending on the version of Eigen code used to implement the operation. Similar behavior can be exhibited by invalid values of `batch_dim`. 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.00198,"percentile":0.09815,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-6qgm-fv6v-rfpv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/ecf768cbe50cedc0a45ce1ee223146a3d3d26d23","tags":["x_refsource_MISC"]}],"priority":{"score":3.7,"factors":[{"name":"EPSS percentile","points":1.96},{"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0"],"from":["GHSA-6qgm-fv6v-rfpv","PYSEC-2021-212"],"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0"],"from":["GHSA-6qgm-fv6v-rfpv","PYSEC-2021-503"],"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2","2.2.0rc0"],"from":["GHSA-6qgm-fv6v-rfpv","PYSEC-2021-701"],"provenance":"source"}],"summary":{"text":"The flaw is in TensorFlow's implementation of the tf.raw_ops.ReverseSequence operation, where the kernel fails to validate that the seq_dim and batch_dim arguments are valid. An attacker who can get the affected code to run with crafted arguments, for example by supplying invalid dimension values to the operation, can trigger a stack overflow or a CHECK failure, depending on the Eigen version in use, causing a denial of service; the vector indicates local access, high attack complexity, and low privileges required, with no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:57Z"},"euvd":{"id":"EUVD-2021-0316","exploited":false,"provenance":"source"}}