{"id":"CVE-2021-29581","published":"2021-05-14T19:15:38Z","modified":"2024-08-03T22:11:05Z","title":"Segfault in `CTCBeamSearchDecoder`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. Due to lack of validation in `tf.raw_ops.CTCBeamSearchDecoder`, an attacker can trigger denial of service via segmentation faults. The implementation(https://github.com/tensorflow/tensorflow/blob/a74768f8e4efbda4def9f16ee7e13cf3922ac5f7/tensorflow/core/kernels/ctc_decoder_ops.cc#L68-L79) fails to detect cases when the input tensor is empty and proceeds to read data from a null buffer. 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.00189,"percentile":0.08716,"provenance":"source"},"cwes":[{"id":"CWE-908","name":"Use of Uninitialized Resource"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-vq2r-5xvm-3hc3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/b1b323042264740c398140da32e93fb9c2c9f33e","tags":["x_refsource_MISC"]}],"priority":{"score":3.5,"factors":[{"name":"EPSS percentile","points":1.74},{"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-vq2r-5xvm-3hc3","PYSEC-2021-218"],"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-vq2r-5xvm-3hc3","PYSEC-2021-509"],"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"],"patched":["2.1.4","2.2.3","2.3.3","2.4.2"],"from":["GHSA-vq2r-5xvm-3hc3","PYSEC-2021-707"],"provenance":"source"}],"summary":{"text":"The flaw is a missing input validation in the CTCBeamSearchDecoder component of TensorFlow, where empty input tensors are not detected and the code reads from a null buffer. An attacker with local access and low privileges, whose crafted input reaches tf.raw_ops.CTCBeamSearchDecoder, can trigger a segmentation fault that causes a denial of service, with no user interaction required and the attack complexity rated high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:11Z"},"euvd":{"id":"EUVD-2021-0322","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29543","parents":[{"from":"CVE-2021-29543","to":"CVE-2021-29581","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/ctc_decoder_ops.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/ea3b43e98c32c97b35d52b4c66f9107452ca8fb2","https://github.com/tensorflow/tensorflow/commit/b1b323042264740c398140da32e93fb9c2c9f33e"],"basis":"rarely changed file"}]}]}}