{"id":"CVE-2021-29561","published":"2021-05-14T19:17:19Z","modified":"2024-08-03T22:11:06Z","title":"CHECK-fail in `LoadAndRemapMatrix`","vendor":"tensorflow","product":"tensorflow","tier":"tail","description":{"text":"TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a denial of service by exploiting a `CHECK`-failure coming from `tf.raw_ops.LoadAndRemapMatrix`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/d94227d43aa125ad8b54115c03cece54f6a1977b/tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc#L219-L222) assumes that the `ckpt_path` is always a valid scalar. However, an attacker can send any other tensor as the first argument of `LoadAndRemapMatrix`. This would cause the rank `CHECK` in `scalar<T>()()` to trigger and terminate the process. 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.0872,"provenance":"source"},"cwes":[{"id":"CWE-617","name":"Reachable Assertion"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-gvm4-h8j3-rjrq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/77dd114513d7796e1e2b8aece214a380af26fbf4","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-gvm4-h8j3-rjrq","PYSEC-2021-198"],"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-gvm4-h8j3-rjrq","PYSEC-2021-489"],"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-gvm4-h8j3-rjrq","PYSEC-2021-687"],"provenance":"source"}],"summary":{"text":"The flaw is a CHECK-failure in the LoadAndRemapMatrix operation of TensorFlow's core kernels, where the implementation assumes the ckpt_path argument is always a valid scalar. An attacker with local access and low privileges who supplies a non-scalar tensor as that first argument can trigger a rank CHECK failure that terminates the process, causing a denial of service, and the attack is considered high complexity and requires no user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:10Z"},"euvd":{"id":"EUVD-2021-0302","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29561","children":[{"from":"CVE-2021-29561","to":"CVE-2022-29199","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/load_and_remap_matrix_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/77dd114513d7796e1e2b8aece214a380af26fbf4","https://github.com/tensorflow/tensorflow/commit/3150642acbbe254e3c3c5d2232143fa591855ac9"],"basis":"shared function","functions":["LoadAndRemapMatrixOp"]}]}]}}