NULL Pointer Dereference Affecting numpy package, versions [0,1.22.2)



    Exploit Maturity Proof of concept
    Attack Complexity High
Expand this section
5.3 medium
Expand this section
5.5 medium
Expand this section
Red Hat
7.5 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-NUMPY-2321964
  • published 19 Dec 2021
  • disclosed 19 Dec 2021
  • credit Daybreak2019

How to fix?

Upgrade numpy to version 1.22.2 or higher.


numpy is a fundamental package needed for scientific computing with Python. Affected versions of this package are vulnerable to NULL Pointer Dereference due to missing return-value validation in the PyArray_DescrNew function, which may allow attackers to conduct Denial of Service attacks by repetitively creating and sort arrays.

Note: This may likely only happen if application memory is already exhausted, as it requires the newdescr object of the PyArray_DescrNew to evaluate to NULL.