CVE-2019-6446: Unsafe Usage of Pickle Module in NumPy
Summary
PYSEC-2019-38: DISPUTED An issue was discovered in NumPy 1.16.0 and earlier. Affects numpy versions < 1.16.1. Fixed in 1.16.1. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
NumPy is a popular Python package that provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays. It is widely used in scientific computing and data analysis applications. However, versions of NumPy up to and including 1.16.0 are vulnerable to a security issue that involves the unsafe usage of the pickle Python module.
Vulnerability Detail
The vulnerability in NumPy arises from its unsafe usage of the pickle module. This allows remote attackers to execute arbitrary code by crafting a serialized object and exploiting it through a numpy.load call. The issue has been assigned the CVE identifier CVE-2019-6446. It is important to note that there is a dispute regarding the severity of this vulnerability, as some argue that the behavior might have legitimate applications, such as loading serialized Python object arrays from trusted and authenticated sources.
How To Fix
Latest published version: 2.5.4 as of 23 Oct 2026
pip install --upgrade "numpy==2.5.4"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.16.1
This is the first release that contains the fix.
pip install --upgrade "numpy==1.16.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating NumPy is not immediately feasible, a possible workaround is to avoid using the numpy.load function with untrusted or unauthenticated serialized objects. By ensuring that only trusted and authenticated sources are used, the risk of exploitation can be mitigated.
Conclusion
The vulnerability in NumPy involving the unsafe usage of the pickle module can potentially allow remote code execution. It is important to update to the latest version of NumPy (1.16.1 or later) to mitigate this vulnerability. If immediate updating is not possible, it is recommended to exercise caution when using the numpy.load function with serialized objects from untrusted sources. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for numpy →
FAQ
NumPy is a Python package that provides support for large, multi-dimensional arrays and matrices, along with mathematical functions to operate on these arrays. It is widely used in scientific computing and data analysis applications.
The vulnerability in NumPy involves the unsafe usage of the pickle module, which allows remote attackers to execute arbitrary code by crafting a serialized object and exploiting it through a numpy.load call.
If exploited, this vulnerability can allow remote attackers to execute arbitrary code on systems running vulnerable versions of NumPy. The impact can vary depending on the privileges of the user running the affected code.
To fix this vulnerability, it is recommended to update NumPy to version 1.16.1 or later. This version includes a fix for the unsafe usage of the pickle module. Users can update NumPy by running the command 'pip install --upgrade numpy'.
If updating NumPy is not immediately feasible, a possible workaround is to avoid using the numpy.load function with untrusted or unauthenticated serialized objects. By ensuring that only trusted and authenticated sources are used, the risk of exploitation can be mitigated.
Related vulnerabilities
Recent vulnerabilities recorded for numpy.