CVE-2021-41495 json
NumPy NULL Pointer Dereference
published 2021-12-17 4 y ago modified 2026-06-17 4 mo ago also GHSA-5545-2q6w-2gh6 , PYSEC-2021-856 , EUVD-2021-0152
- cvss
- 5.3
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
Null Pointer Dereference vulnerability exists in numpy.sort in NumPy < and 1.19 in the PyArray_DescrNew function due to missing return-value validation, which allows attackers to conduct DoS attacks by repetitively creating sort arrays. NOTE: While correct that validation is missing, an error can only occur due to an exhaustion of memory. If the user can exhaust memory, they are already privileged. Further, it should be practically impossible to construct an attack which can target the memory exhaustion to occur at exactly this place
Patch / fix
- pypi numpy 1.19, 1.19.1
- numpy Ubuntu 20.04 LTS 1:1.17.4-5ubuntu3.1
- numpy Ubuntu 22.04 LTS 1:1.21.5-1ubuntu22.04.1
ubuntu advisories UBUNTU-CVE-2021-41495
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- numpy openstack 16.2, openstack 16.1 1:1.17.0-11.el8ost
- python3-numpy openstack 16.2, openstack 16.1 1:1.17.0-11.el8ost
- python3-numpy-f2py openstack 16.2, openstack 16.1 1:1.17.0-11.el8ost
red hat advisories RHSA-2022:8852RHSA-2022:8861
- python3-numpy SLE Module for Basesystem 15 SP6, openSUSE Leap 15.6 1.17.3-150400.31.1
- python-numpy_1_17_3-gnu-hpc SLE Module for Package Hub 15 SP6, SLE Module for HPC 15 SP6, openSUSE Leap 15.6 1.17.3-150400.31.1
- python2-numpy SLE Module for Python 2 15 SP3, SLE High Performance Computing 15 SP2-ESPOS, Manager Server 4.1 +6 more 1.16.5-150200.3.5.1
- python-numpy_1_16_5-gnu-hpc SLE Module for HPC 15 SP3, SLE High Performance Computing 15 SP2-ESPOS, openSUSE Leap 15.4 +1 more 1.16.5-150200.3.5.1
- python-numpy_1_13_3-gnu-hpc SLE Module for HPC 12 1.13.3-4.15.1
- python-numpy SLE Module for Basesystem 15 SP4, openSUSE Leap 15.4 1.17.3-150400.23.3.1
- python-numpy_1_17_3-gnu-hpc SLE Module for HPC 15 SP4, openSUSE Leap 15.4 1.17.3-150400.23.3.1
- python-numpy SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 1.8.0-5.14.1
suse advisories SUSE-SU-2025:0424-1SUSE-SU-2022:1064-2SUSE-SU-2022:1064-1SUSE-SU-2022:2793-1SUSE-SU-2022:2646-1SUSE-SU-2022:2645-1
- python-numpy openSUSE Tumbleweed 2.4.6-1.1
- python-numpy1 openSUSE Tumbleweed 1.26.4-1.1
- python-numpy openSUSE Tumbleweed 1.25.2-2.1
- python2-numpy openSUSE Leap 15.3 1.16.5-150200.3.5.1
- python-numpy_1_16_5-gnu-hpc openSUSE Leap 15.3 1.16.5-150200.3.5.1
opensuse advisories openSUSE-SU-2026:11371-1openSUSE-SU-2024:14311-1openSUSE-SU-2024:13220-1openSUSE-SU-2022:1064-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-41495 updated cvss 7.5
numpy: NULL pointer dereference in numpy.sort in in the PyArray_DescrNew() due to missing return-value validation
-
Red Hat Enterprise Linux 6 numpy, numpy-f2py Red Hat Enterprise Linux 7 numpy, numpy-f2pyaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 numpy, python3-numpy, python3-numpy-f2pyaffected: no fix planned “Will not fix”
-
Red Hat OpenStack Platform 13 (Queens) python2-numpy, python2-numpy-f2pyaffected: no fix planned “Out of support scope”
-
Red Hat Software Collections python27-numpy, python27-numpy-f2py, rh-python38-python-numpy, rh-python38-python-numpy-f2pyaffected: no fix planned “Will not fix”
-
Red Hat OpenStack Platform 16.1 numpy 1.17.0-11.el8ost, python3-numpy 1.17.0-11.el8ost, python3-numpy-f2py 1.17.0-11.el8ostfixed: vendor fix RHSA-2022:8861
-
Red Hat OpenStack Platform 16.2 numpy 1.17.0-11.el8ost, python3-numpy 1.17.0-11.el8ost, python3-numpy-f2py 1.17.0-11.el8ostfixed: vendor fix RHSA-2022:8852
-
Red Hat Enterprise Linux 9 python3-numpy, python3-numpy-f2pynot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.24% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/numpy/numpy/issues/19038 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 3.5 | AV:N/AC:M/Au:S/C:N/I:N/A:P |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | numpy | <1.19 <1.19.1 |
1.19 1.19.1 |
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
References
-
github.com
/numpy/numpy/issues/19038
web, exploit, issue-tracking, third-party-advisory, report
-
oracle.com
/security-alerts/cpujul2022.html
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-41495
advisory
-
github.com
/advisories/GHSA-5545-2q6w-2gh6
advisory
-
github.com
/numpy/numpy
package
-
github.com
/pypa/advisory-database/tree/main/vulns/numpy/PYSEC-2021-856.yaml
web
Sources
- CVE List CVE-2021-41495
- GitHub Advisory GHSA-5545-2q6w-2gh6
- NVD CVE-2021-41495
- OSV PYSEC-2021-856
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.