Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41495

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41495
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:20 UTC · Revision 1

Source evidence

CVE-2021-41495

core-osv · Original source

Published 17 Dec 2021, 20:15 UTC

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

osv:CVE-2021-41495
Complete source record
{
  "id": "cc0e6cfd803098923661a9c28a08527c303485c25cd424b0878ce1b6545589f3",
  "url": "https://osv.dev/vulnerability/CVE-2021-41495",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41495",
    "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",
    "evidence": "osv:CVE-2021-41495",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-41495",
      "aliases": [
        "CVE-2021-41495",
        "GHSA-5545-2q6w-2gh6",
        "PYSEC-2021-856"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/numpy/numpy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "92ebe1e9a6aeb47a881a1226b08218175776f9ea"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:numpy:numpy:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.19.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.19.0",
            "v1.19.0rc2",
            "v1.19.0rc1",
            "pre-removal-numpybook",
            "with_maskna",
            "v0.3.0",
            "v0.2.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41495.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:00.650030309Z",
      "provider": "osv",
      "references": [
        "https://www.oracle.com/security-alerts/cpujul2022.html",
        "https://github.com/numpy/numpy/issues/19038"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41495",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384814,
  "published_at": "2021-12-17T20:15:08.477+00:00"
}