CVE-2019-6446: Numpy Deserialization of Untrusted Data

numpy Updated 02 Oct 2025

Summary

24/05/2022
No i
Critical
9.8

CVE-2019-6446: Numpy Deserialization of Untrusted Data. Affects numpy versions < 1.16.0. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

NumPy is a popular Python package used for scientific computing and data analysis. 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 various domains, including machine learning, data science, and numerical computations. However, versions up to and including 1.16.0 of NumPy are vulnerable to a deserialization issue when using the pickle Python module. This vulnerability allows remote attackers to execute arbitrary code by exploiting a crafted serialized object, such as through a numpy.load call.

Vulnerability Detail

The vulnerability in NumPy arises from its unsafe usage of the pickle module. By allowing the deserialization of untrusted data, an attacker can construct a malicious serialized object that, when loaded by NumPy, triggers the execution of arbitrary code. This can lead to various security risks, including remote code execution, privilege escalation, and unauthorized access to sensitive data. It is important to note that there is a dispute regarding the severity of this issue, as some argue that the behavior exploited by the vulnerability can have legitimate applications when loading serialized Python object arrays from trusted and authenticated sources.

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

As a workaround, it is advised to avoid loading serialized objects from untrusted sources using NumPy. If possible, consider using alternative methods for deserialization or ensure that the serialized objects come from trusted and authenticated sources.

Conclusion

In conclusion, the vulnerability in NumPy (CVE-2019-6446) allows remote attackers to execute arbitrary code by exploiting a deserialization issue when using the pickle module. It is crucial to update to a version of NumPy that is not affected by the vulnerability (higher than 1.16.0) and avoid loading serialized objects from untrusted sources. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for numpy →

Share this vulnerability

FAQ

NumPy is a Python package used for scientific computing and data analysis. It provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays.

The vulnerability allows remote attackers to execute arbitrary code, which can lead to various security risks, including remote code execution, privilege escalation, and unauthorized access to sensitive data.

Yes, upgrading to a version of NumPy higher than 1.16.0 fixes the vulnerability. Users should update their NumPy package by running 'pip install --upgrade numpy'.

As a workaround, it is advised to avoid loading serialized objects from untrusted sources using NumPy. If possible, consider using alternative methods for deserialization or ensure that the serialized objects come from trusted and authenticated sources.

The dispute arises from the fact that the behavior exploited by the vulnerability can have legitimate applications when loading serialized Python object arrays from trusted and authenticated sources. However, it is still considered a security risk when dealing with untrusted data.

Related vulnerabilities

Recent vulnerabilities recorded for numpy.

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