{"id":"CVE-2021-29577","published":"2021-05-14T19:15:59Z","modified":"2024-08-03T22:11:05Z","title":"Heap buffer overflow in `AvgPool3DGrad`","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.AvgPool3DGrad` is vulnerable to a heap buffer overflow. The implementation(https://github.com/tensorflow/tensorflow/blob/d80ffba9702dc19d1fac74fc4b766b3fa1ee976b/tensorflow/core/kernels/pooling_ops_3d.cc#L376-L450) assumes that the `orig_input_shape` and `grad` tensors have similar first and last dimensions but does not check that this assumption is validated. 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.00211,"percentile":0.1152,"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-v6r6-84gr-92rm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/tensorflow/tensorflow/commit/6fc9141f42f6a72180ecd24021c3e6b36165fe0d","tags":["x_refsource_MISC"]}],"priority":{"score":4.1,"factors":[{"name":"EPSS percentile","points":2.3},{"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-v6r6-84gr-92rm","PYSEC-2021-214"],"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-v6r6-84gr-92rm","PYSEC-2021-505"],"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-v6r6-84gr-92rm","PYSEC-2021-703"],"provenance":"source"}],"summary":{"text":"The flaw is a heap buffer overflow in the AvgPool3DGrad operation of TensorFlow, specifically in the implementation behind tf.raw_ops.AvgPool3DGrad, which assumes the orig_input_shape and grad tensors share matching first and last dimensions without validating that assumption. An attacker with local access and low privileges, who can get TensorFlow to run this operation with crafted inputs and no user interaction, can cause a memory corruption that affects availability (a crash or disruption of the process).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:40Z"},"euvd":{"id":"EUVD-2021-0318","exploited":false,"provenance":"source"}}