CVE-2021-41196
MEDIUM 5.5CVSS 3.1Crash in `max_pool3d` when size argument is 0 or negative
TensorFlow is an open source platform for machine learning. In affected versions the Keras pooling layers can trigger a segfault if the size of the pool is 0 or if a dimension is negative. This is due to the TensorFlow's implementation of pooling operations where the values in the sliding window are not checked to be strictly positive. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
- Published
- 5 Nov 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-191
- Also known as
- BIT-tensorflow-2021-41196GHSA-m539-j985-hcr8PYSEC-2021-389PYSEC-2021-606PYSEC-2021-804
- Sources
- NVDJSONOSV GHSA-m539-j985-hcr8JSONOSV PYSEC-2021-389JSONOSV PYSEC-2021-606JSONOSV PYSEC-2021-804JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 2.1 | AV:L/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
< 2.4.4 | 2.4.4 | |
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
>= 2.5.0, < 2.5.2 | 2.5.2 | |
| NVD | tensorflowcpe:2.3:a:google:tensorflow:*:*:*:*:*:*:*:* |
>= 2.6.0, < 2.6.1 | 2.6.1 | |
| OSV | PyPI | tensorflow | >= 2.6.0, < 2.6.1 | 2.6.1 |
| OSV | PyPI | tensorflow | >= 2.5.0, < 2.5.2 | 2.5.2 |
| OSV | PyPI | tensorflow | < 2.4.4 | 2.4.4 |
| OSV | PyPI | tensorflow-cpu | >= 2.6.0, < 2.6.1 | 2.6.1 |
| OSV | PyPI | tensorflow-cpu | >= 2.5.0, < 2.5.2 | 2.5.2 |
| OSV | PyPI | tensorflow-cpu | < 2.4.4 | 2.4.4 |
| OSV | PyPI | tensorflow-gpu | >= 2.6.0, < 2.6.1 | 2.6.1 |
| OSV | PyPI | tensorflow-gpu | >= 2.5.0, < 2.5.2 | 2.5.2 |
| OSV | PyPI | tensorflow-gpu | < 2.4.4 | 2.4.4 |
| OSV | PyPI | tensorflow | < 2.4.4; >= 2.5.0, < 2.5.2; >= 2.6.0, < 2.6.1; >= 2.7.0rc0, < 2.7.0 | 2.4.4, 2.5.2, 2.6.1, 2.7.0 |
| OSV | PyPI | tensorflow-cpu | < 2.4.4; >= 2.5.0, < 2.5.2; >= 2.6.0, < 2.6.1; >= 2.7.0rc0, < 2.7.0 | 2.4.4, 2.5.2, 2.6.1, 2.7.0 |
| OSV | PyPI | tensorflow-gpu | < 2.4.4; >= 2.5.0, < 2.5.2; >= 2.6.0, < 2.6.1; >= 2.7.0rc0, < 2.7.0 | 2.4.4, 2.5.2, 2.6.1, 2.7.0 |
References
- https://github.com/tensorflow/tensorflow/commit/12b1ff82b3f26ff8de17e58703231d5a02ef1b8b · Patch, Third Party Advisory, WEB, FIX
- https://github.com/tensorflow/tensorflow/issues/51936 · Exploit, Third Party Advisory, WEB, REPORT
- https://github.com/tensorflow/tensorflow/security/advisories/GHSA-m539-j985-hcr8 · Exploit, Third Party Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2021-41196 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-cpu/PYSEC-2021-606.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow-gpu/PYSEC-2021-804.yaml · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/tensorflow/PYSEC-2021-389.yaml · WEB
- https://github.com/tensorflow/tensorflow · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 5 Nov 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 Nov 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 Nov 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 5 Nov 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Nov 2021)