{"id":"CVE-2021-29582","published":"2021-05-14T19:15:34Z","modified":"2024-08-03T22:11:06Z","title":"Heap OOB read in `tf.raw_ops.Dequantize`","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.Dequantize`, an attacker can trigger a read from outside of bounds of heap allocated data. The implementation(https://github.com/tensorflow/tensorflow/blob/26003593aa94b1742f34dc22ce88a1e17776a67d/tensorflow/core/kernels/dequantize_op.cc#L106-L131) accesses the `min_range` and `max_range` tensors in parallel but fails to check that they have the same shape. 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.05545,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/tensorflow/tensorflow/security/advisories/GHSA-c45w-2wxr-pp53","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/5899741d0421391ca878da47907b1452f06aaf1b","tags":["x_refsource_MISC"]}],"priority":{"score":2.9,"factors":[{"name":"EPSS percentile","points":1.11},{"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-c45w-2wxr-pp53","PYSEC-2021-219"],"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-c45w-2wxr-pp53","PYSEC-2021-510"],"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-c45w-2wxr-pp53","PYSEC-2021-708"],"provenance":"source"}],"summary":{"text":"The flaw is a heap out-of-bounds read in the Dequantize operation (tf.raw_ops.Dequantize) of TensorFlow's core kernels, caused by missing validation that the min_range and max_range tensors share the same shape. An attacker who can reach the operation with crafted inputs, with local access and low privileges and with a tensor-shape mismatch that the code path does not check, can trigger reads from memory outside the bounds of a heap allocation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:57Z"},"euvd":{"id":"EUVD-2021-0323","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-tensorflow-cve-2021-29582","children":[{"from":"CVE-2021-29582","to":"CVE-2022-21726","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["tensorflow/core/kernels/dequantize_op.cc"],"commits":["https://github.com/tensorflow/tensorflow/commit/5899741d0421391ca878da47907b1452f06aaf1b","https://github.com/tensorflow/tensorflow/commit/23968a8bf65b009120c43b5ebcceaf52dbc9e943"],"basis":"shared function","functions":["DequantizeOp"]}]}]}}