CVE-2026-44512: Onnx ONNX Has Null Pointer Dereference Vulnerability

MODERATE
Advisory Identifier: GHSA-hwpq-hmq9-wj77
CVSS 5.5
CWE-476
Published
Advisory Summary

CVE-2026-44512 is a MODERATE (CVSS 5.5) onnx has null pointer dereference vulnerability (CWE-476: NULL Pointer Dereference) affecting Onnx libraries in the PyPI ecosystem. The issue involves onnx has null pointer dereference in upsample version converter adapter (zero inputs). Remediation is available by upgrading affected packages to version 1.22.0.

CVE-2026-44512 at a Glance

CVE Identifier CVE-2026-44512
GHSA Identifier GHSA-hwpq-hmq9-wj77
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-476: NULL Pointer Dereference
Affected Product Onnx
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-44512

To remediate this vulnerability, upgrade all affected Onnx dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

onnx fixed: 1.22.0
pip install onnx>=1.22.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show onnx

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-44512, inspect your installed packages using pip:

pip show onnx

Analyze the terminal output to locate any version of Onnx in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.22.0), your application is affected.

Note: The pip show onnx command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In Onnx, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Null pointer dereference (SIGSEGV) in `Upsample_6_7::adapt_upsample_6_7()` (`onnx/version_converter/adapters/upsample_6_7.h:31`) when `convert_version()` processes a model with an Upsample node that has zero inputs. The adapter accesses `node->inputs()[0]->sizes()` without checking input count. 107-byte PoC crashes on Release build. This is the same class of bug as the Cast adapter advisory (separate report) but in a different adapter, different file, and different operator. ### Details The Upsample 6→7 adapter validates attributes but not inputs: ```cpp // upsample_6_7.h:20-33 void adapt_upsample_6_7(..., Node* node) const { ONNX_ASSERTM( node->hasAttribute(width_scale_symbol) && node->hasAttribute(height_scale_symbol), "...") // Attribute check PASSES auto width_scale = node->f(width_scale_symbol); auto height_scale = node->f(height_scale_symbol); auto input_shape = node->inputs()[0]->sizes(); // ^^^^^^^^^^^^^^^^^^^^ // OOB when inputs().size() == 0 → SIGSEGV } ``` The PoC has an Upsample node at opset 6 with the required `width_scale` and `height_scale` attributes but zero inputs. The attribute assertions pass, then `node->inputs()[0]` on an empty `ArrayRef`: - Release builds (`NDEBUG`): bounds-check assertion compiled out → reads garbage pointer → SIGSEGV - Debug builds: `assert(Index < Length)` at `array_ref.h:159` → SIGABRT An Upsample node with zero inputs passes `graphProtoToGraph()` because the import code only resolves input names present in the protobuf. ### PoC ```python import base64 import onnx from onnx import version_converter poc_b64 = "CAI6YQo8EgFZIghVcHNhbXBsZSoVCgt3aWR0aF9zY2FsZRUAAABAoAEBKhYKDGhlaWdodF9zY2FsZRUAAABAoAEBEgR0ZXN0YhsKAVkSFgoUCAESEAoCCAEKAggBCgIIBAoCCARCBAoAEAY=" model = onnx.load_from_string(base64.b64decode(poc_b64)) # CRASHES — Upsample_6_7 adapter dereferences empty inputs array version_converter.convert_version(model, 7) # SIGSEGV ``` 107-byte PoC. Confirmed SIGSEGV on both onnx 1.21.0 (pip) and 1.22.0 (source build). ### Impact Any application that uses `onnx.version_converter.convert_version()` on untrusted models is vulnerable. This includes model conversion pipelines and tools that auto-upgrade opset versions for compatibility. The crash is unrecoverable (SIGSEGV). This vulnerability is part of a systemic pattern across multiple version converter adapters. A full audit of all ~45 adapters was performed as part of the fix; eight adapters were found with the same class of unguarded indexed access (cast_9_8, softmax_12_13, softmax_13_12, upsample_6_7, upsample_9_10, group_normalization_20_21, broadcast_forward_compatibility, upsample_9_8) and all have been fixed in PR #7813.

CVE-2026-44512 Affected Onnx Versions

1 component(s)
Fixed Versions:
1.22.0
Product / Package Ecosystem Affected Versions Fixed Version
onnx
PyPI
≥ 1.9.0
< 1.22.0
1.22.0

References

Frequently Asked Questions

What is CVE-2026-44512?
CVE-2026-44512 is a security vulnerability in Onnx involving ONNX has Null Pointer Dereference in Upsample Version Converter Adapter (Zero Inputs) under CWE-476: NULL Pointer Dereference.
Which Onnx versions are affected?
Affected versions include releases prior to 1.22.0 across affected packages: onnx.
What version fixes CVE-2026-44512?
Upgrading to 1.22.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is onnx affected?
Yes, onnx is affected in releases prior to 1.22.0. Upgrade your dependency to 1.22.0 or later.
What is the CVSS score of CVE-2026-44512?
CVE-2026-44512 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-44512?
CVE-2026-44512 is classified under CWE-476: NULL Pointer Dereference (The product dereferences a pointer that it expects to be valid but is NULL.).
How can I check PyPI dependencies for CVE-2026-44512?
Run the dependency tree command: 'pip show onnx'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hwpq-hmq9-wj77",
  "modified" : "2026-07-07T13:02:10Z",
  "published" : "2026-07-07T13:02:10Z",
  "aliases" : [ "CVE-2026-44512" ],
  "summary" : "ONNX has Null Pointer Dereference in Upsample Version Converter Adapter (Zero Inputs)",
  "details" : "### Summary\n\nNull pointer dereference (SIGSEGV) in `Upsample_6_7::adapt_upsample_6_7()` (`onnx/version_converter/adapters/upsample_6_7.h:31`) when `convert_version()` processes a model with an Upsample node that has zero inputs. The adapter accesses `node->inputs()[0]->sizes()` without checking input count. 107-byte PoC crashes on Release build.\n\nThis is the same class of bug as the Cast adapter advisory (separate report) but in a different adapter, different file, and different operator.\n\n### Details\n\nThe Upsample 6→7 adapter validates attributes but not inputs:\n```cpp\n// upsample_6_7.h:20-33\nvoid adapt_upsample_6_7(..., Node* node) const {\n    ONNX_ASSERTM(\n        node->hasAttribute(width_scale_symbol) && node->hasAttribute(height_scale_symbol),\n        \"...\")  // Attribute check PASSES\n\n    auto width_scale = node->f(width_scale_symbol);\n    auto height_scale = node->f(height_scale_symbol);\n\n    auto input_shape = node->inputs()[0]->sizes();\n    //                 ^^^^^^^^^^^^^^^^^^^^\n    //                 OOB when inputs().size() == 0 → SIGSEGV\n}\n```\n\nThe PoC has an Upsample node at opset 6 with the required `width_scale` and `height_scale` attributes but zero inputs. The attribute assertions pass, then `node->inputs()[0]` on an empty `ArrayRef`:\n- Release builds (`NDEBUG`): bounds-check assertion compiled out → reads garbage pointer → SIGSEGV\n- Debug builds: `assert(Index < Length)` at `array_ref.h:159` → SIGABRT\n\nAn Upsample node with zero inputs passes `graphProtoToGraph()` because the import code only resolves input names present in the protobuf.\n\n### PoC\n```python\nimport base64\nimport onnx\nfrom onnx import version_converter\n\npoc_b64 = \"CAI6YQo8EgFZIghVcHNhbXBsZSoVCgt3aWR0aF9zY2FsZRUAAABAoAEBKhYKDGhlaWdodF9zY2FsZRUAAABAoAEBEgR0ZXN0YhsKAVkSFgoUCAESEAoCCAEKAggBCgIIBAoCCARCBAoAEAY=\"\n\nmodel = onnx.load_from_string(base64.b64decode(poc_b64))\n\n# CRASHES — Upsample_6_7 adapter dereferences empty inputs array\nversion_converter.convert_version(model, 7)  # SIGSEGV\n```\n\n107-byte PoC. Confirmed SIGSEGV on both onnx 1.21.0 (pip) and 1.22.0 (source build).\n\n### Impact\n\nAny application that uses `onnx.version_converter.convert_version()` on untrusted models is vulnerable. This includes model conversion pipelines and tools that auto-upgrade opset versions for compatibility. The crash is unrecoverable (SIGSEGV). \n\nThis vulnerability is part of a systemic pattern across multiple version converter adapters. A full audit of all ~45 adapters was performed as part of the fix; eight adapters were found with the same class of unguarded indexed access (cast_9_8, softmax_12_13, softmax_13_12, upsample_6_7, upsample_9_10, group_normalization_20_21, broadcast_forward_compatibility, upsample_9_8) and all have been fixed in PR #7813.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "onnx"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.9.0"
      }, {
        "fixed" : "1.22.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/security/advisories/GHSA-hwpq-hmq9-wj77"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/pull/7916"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/onnx/onnx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/releases/tag/v1.22.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-476" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-07T13:02:10Z",
    "nvd_published_at" : null
  }
}