What’s Vulnerable › Vulnerabilities
CVE-2021-34141: Incorrect Comparison in NumPy
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-12-17 · updated 2026-10-08
- Weakness: CWE-697
Description
An incomplete string comparison in the numpy.core component in NumPy before 1.22.0 allows attackers to trigger slightly incorrect copying by constructing specific string objects. NOTE: the vendor states that this reported code behavior is "completely harmless."
Affected products
- Numpy: before 1.22.0 — fixed in 1.22.0
- Oracle Communications Cloud Native Core Policy: 22.1.3
- Pypi Numpy: before 1.22; 0.9.6, 0.9.8, 1.0, 1.0.3, 1.0.4, 1.0b1 (+88) — fixed in 1.22
How to fix
Upgrade to a fixed version: Numpy 1.22.0; Pypi Numpy 1.22. Check the vendor advisory for mitigations.
References
- https://github.com/numpy/numpy/issues/18993
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://github.com/numpy/numpy/issues/18993
- https://www.oracle.com/security-alerts/cpujul2022.html
Get alerted when CVE-2021-34141 or the next vulnerability affects your stack