cve.bz

CVE-2021-34141 Incorrect Comparison

5.3 mediumExploit referenceEPSS 1.7%Fix available

Medium (5.3). EPSS 1.7% estimated probability of exploitation activity in the next 30 days. Fixed in numpy 1.10.0, 1.22.

On this page
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."

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS
1.7% (unchanged from 1.7% a week ago; 1.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-697 Incorrect Comparison
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-34141 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-34141?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-34141?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-34141 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2021-34141

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2021-34141](https://cve.bz/cve/badge/CVE-2021-34141.svg)](https://cve.bz/cve/CVE-2021-34141)

HTML:

<a href="https://cve.bz/cve/CVE-2021-34141"><img src="https://cve.bz/cve/badge/CVE-2021-34141.svg" alt="CVE-2021-34141"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
numpy:numpybefore 1.22.0
oracle:communications_cloud_native_core_policy22.1.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-fpfv-jqm9-f5jmPyPInumpy<1.221.22
PYSEC-2021-855PyPInumpy>=1.9.0 <1.10.01.10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14numpyno fix listedDEBIAN-CVE-2021-34141
Ubuntu20.04:LTSnumpy1:1.17.4-5ubuntu3.1UBUNTU-CVE-2021-34141 USN-5763-1
Ubuntu22.04:LTSnumpy1:1.21.5-1ubuntu22.04.1UBUNTU-CVE-2021-34141 USN-5763-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Low.

Red Hat's statement

Red Hat products using an affected version of numpy are at essentially no risk of exploitation from this vulnerability given the high privileges and high complexity required for successful exploitation. The preconditions necessary to exploit are:

1) A privileged user or a non-standard configuration of numpy to provide a non-validated dtype string.

2) The ability to execute arbitrary code at runtime.

More specifically:

1) A user must be able to provide a non-validated dtype string to be parsed by numpy; something that would require a privileged user or a non-standard configuration.

2) Even then, the specific code block where the vulnerability is present cannot be reached without the attacker modifying the runtime environment to prevent an error from being thrown earlier in the code (before the string comparison), when the code checks an internal dictionary to determine the validity of the user-provided string type. Such runtime modifications would require executing arbitrary Python code.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6numpyNot affected
Red Hat Enterprise Linux 7numpyNot affected
Red Hat Enterprise Linux 8inkscape:flatpak/numpyFix deferred
Red Hat Enterprise Linux 8numpyFix deferred
Red Hat Enterprise Linux 8python27:2.7/numpyFix deferred
Red Hat Enterprise Linux 8python38:3.8/numpyFix deferred
Red Hat Enterprise Linux 8python39:3.9/numpyFix deferred
Red Hat Enterprise Linux 9numpyWill not fix
Red Hat OpenStack Platform 13 (Queens)numpyNot affected
Red Hat OpenStack Platform 16.1numpyNot affected
Red Hat OpenStack Platform 16.2numpyNot affected
Red Hat Software Collectionspython27-numpyNot affected
Red Hat Software Collectionsrh-python38-numpyFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-34141.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-697 (29).

References

Check your stackJSON