Incomplete String Comparison in NumPy Core Component (CVE-2021-34141)

numpy Updated 02 Oct 2025

Summary

17/12/2021
N/A
No i
Medium
5.3

CVE-2021-34141: 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. Affects numpy versions < 4adc87dff15a247e417d50f10cc4def8e1c17a03. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

NumPy is a popular library for numerical computing in Python. It provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays. NumPy is widely used in scientific and data analysis applications. However, a vulnerability has been discovered in the numpy.core component of NumPy before version 1.22.0.

Vulnerability Detail

The vulnerability, identified as CVE-2021-34141, is an incomplete string comparison issue. Attackers can exploit this vulnerability by constructing specific string objects, which can trigger slightly incorrect copying in the numpy.core component. Although the vendor states that this behavior is "completely harmless," it can potentially lead to unexpected results or errors in certain scenarios.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. However, users can mitigate the risk by updating to the latest version of NumPy as mentioned in the 'how_to_fix' section.

Conclusion

In conclusion, the incomplete string comparison vulnerability in the numpy.core component of NumPy before version 1.22.0 can lead to slightly incorrect copying in certain scenarios. While the impact is considered low, it is recommended to update NumPy to the latest version to mitigate any potential risks. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for numpy →

Share this vulnerability

FAQ

NumPy is a Python library for numerical computing, providing support for large, multi-dimensional arrays and matrices.

The impact of this vulnerability is considered to be low, as the vendor states that the reported code behavior is "completely harmless." However, it can lead to slightly incorrect copying in certain scenarios.

To fix this vulnerability, update NumPy to version 1.22.0 or later.

There is no specific workaround provided for this vulnerability. Updating to the latest version of NumPy is the recommended approach.

You can find more information about this vulnerability in the CVE-2021-34141 JSON report available at the provided source link.

Related vulnerabilities

Recent vulnerabilities recorded for numpy.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback