{"cve":"CVE-2021-29579","nvd":{"published":"2021-05-14T20:15:14.247","modified":"2026-06-17T03:47:57.170","status":"Modified","description":"TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.MaxPoolGrad` is vulnerable to a heap buffer overflow. The implementation(https://github.com/tensorflow/tensorflow/blob/ab1e644b48c82cb71493f4362b4dd38f4577a1cf/tensorflow/core/kernels/maxpooling_op.cc#L194-L203) fails to validate that indices used to access elements of input/output arrays are valid. Whereas accesses to `input_backprop_flat` are guarded by `FastBoundsCheck`, the indexing in `out_backprop_flat` can result in OOB access. 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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8},"cwes":["CWE-787","CWE-119"],"references":["https://github.com/tensorflow/tensorflow/commit/a74768f8e4efbda4def9f16ee7e13cf3922ac5f7","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-79fv-9865-4qcv","https://github.com/tensorflow/tensorflow/commit/a74768f8e4efbda4def9f16ee7e13cf3922ac5f7","https://github.com/tensorflow/tensorflow/security/advisories/GHSA-79fv-9865-4qcv"],"products":["google:tensorflow"],"source":"nvd","synced_at":"2026-10-19T21:18:09.669877188+00:00"},"epss":{"cve":"CVE-2021-29579","score":0.00214,"percentile":0.11736,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-79fv-9865-4qcv","url":"https://osv.dev/vulnerability/GHSA-79fv-9865-4qcv","summary":"Heap buffer overflow in `MaxPoolGrad`","modified":"2026-07-08T06:28:23.021669632Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":["<2.1.4"],"fixed":["2.1.4"]},{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.2.0 <2.2.3"],"fixed":["2.2.3"]},{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.3.0 <2.3.3"],"fixed":["2.3.3"]},{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":[">=2.4.0 <2.4.2"],"fixed":["2.4.2"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":["<2.1.4"],"fixed":["2.1.4"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.2.0 <2.2.3"],"fixed":["2.2.3"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.3.0 <2.3.3"],"fixed":["2.3.3"]},{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":[">=2.4.0 <2.4.2"],"fixed":["2.4.2"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":["<2.1.4"],"fixed":["2.1.4"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.2.0 <2.2.3"],"fixed":["2.2.3"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.3.0 <2.3.3"],"fixed":["2.3.3"]},{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":[">=2.4.0 <2.4.2"],"fixed":["2.4.2"]}]},{"id":"PYSEC-2021-216","url":"https://osv.dev/vulnerability/PYSEC-2021-216","summary":"","modified":"2023-12-06T01:01:07.264129Z","packages":[{"ecosystem":"PyPI","name":"tensorflow","purl":"pkg:pypi/tensorflow","ranges":["<2.1.4",">=2.2.0 <2.2.3",">=2.3.0 <2.3.3",">=2.4.0 <2.4.2"],"fixed":["2.1.4","2.2.3","2.3.3","2.4.2"]}]},{"id":"PYSEC-2021-507","url":"https://osv.dev/vulnerability/PYSEC-2021-507","summary":"","modified":"2023-12-06T01:01:07.264129Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-cpu","purl":"pkg:pypi/tensorflow-cpu","ranges":["<2.1.4",">=2.2.0 <2.2.3",">=2.3.0 <2.3.3",">=2.4.0 <2.4.2"],"fixed":["2.1.4","2.2.3","2.3.3","2.4.2"]}]},{"id":"PYSEC-2021-705","url":"https://osv.dev/vulnerability/PYSEC-2021-705","summary":"","modified":"2023-12-06T01:01:07.264129Z","packages":[{"ecosystem":"PyPI","name":"tensorflow-gpu","purl":"pkg:pypi/tensorflow-gpu","ranges":["<2.1.4",">=2.2.0 <2.2.3",">=2.3.0 <2.3.3",">=2.4.0 <2.4.2"],"fixed":["2.1.4","2.2.3","2.3.3","2.4.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}