Skip to content

GHSA-fpfv-jqm9-f5jm CVE-2021-34141 PYSEC-2021-855

Incorrect Comparison in NumPy

Medium PyPI
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.68%
Chance of exploitation in the next 30 days. Higher than 76.92% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-697 Incorrect Comparison
Fix
1.22
Upgrade numpy to this version or later

Description

Incomplete string comparison in the numpy.core component in NumPy1.9.x, which allows attackers to fail the APIs via constructing specific string objects.

Affected versions

PyPI

PackageVulnerableFixed in
numpy
< 1.22
1.22
numpy
>= 1.9.0, < 1.10.0
1.10.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

numpy PyPI → 1.22

pip
pip install --upgrade "numpy>=1.22"
poetry
poetry add "numpy>=1.22"
uv
uv add "numpy>=1.22"

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Weakness

CWE-697: Incorrect Comparison

The product compares two entities in a security-relevant context, but the comparison is incorrect.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-f7c7-j99h-c22f
Buffer Copy without Checking Size of Input in NumPy
Medium Also affects numpy
GHSA-5545-2q6w-2gh6
NumPy NULL Pointer Dereference
High Also affects numpy
GHSA-6p56-wp2h-9hxr
NumPy Buffer Overflow (Disputed)
Medium Also affects numpy
GHSA-9fq2-x9r6-wfmf
Numpy Deserialization of Untrusted Data
Critical Also affects numpy
GHSA-cw6w-4rcx-xphc
Arbitrary file write in NumPy
Medium Also affects numpy
GHSA-2fc2-6r4j-p65h
Numpy arbitrary file write via symlink attack
Medium Also affects numpy
GHSA-frgw-fgh6-9g52
Numpy missing input validation
High Also affects numpy
GHSA-rpw4-54j3-4h4q
ip-address: Address6.isLinkLocal() recognizes fe80::/64 rather than fe80::/10, allowing SSRF and trust-boundary bypass to on-link hosts
Medium Same weakness, CWE-697
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor