CVE-2026-115921

ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute

Published Oct 26, 2026 CVSS 3.1 · 6.2 Medium EPSS < 1% KEV · Not listed
Description
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.

Analysis

AI-generated

Technical impact

The vulnerability resides in the ScanInferenceFunction, ScanInferenceFunction_opset8 and ScanInferenceFunction_opset9 components of ONNX between versions 1.4.0 and 1.22.0. When the required attribute num_scan_inputs is omitted, the function dereferences a null pointer, causing the inference engine to terminate. When the attribute is negative, the value is cast to size_t, enabling an oversized allocation path that can lead to further crashes. Untrusted models that lack this attribute or use negative values can therefore disrupt shape inference, effectively denying service to any operation that relies on ONNX shape analysis or model execution.

Affected Systems

All installations of the ONNX library with versions from 1.4.0 up to and including 1.21.x are affected. The issue is fixed in ONNX 1.22.0 and later. Products that embed ONNX without updating to the fixed version are at risk.

Risk and Exploitability

The CVSS score of 6.2 indicates moderate severity. No EPSS score is available, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is the receipt of a malicious model file or input that triggers the ScanInferenceFunction; an attacker who can supply such a model to an ONNX-enabled system—such as a machine learning service or a checker tool—could cause a local denial of service. The exploit is straightforward and does not require privileged access, making it a credible threat to systems that process untrusted models.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the ONNX library to version 1.22.0 or later to apply the vendor's fix.
  • Validate or sanitize incoming model files to ensure the num_scan_inputs attribute is present and non‑negative before invoking ONNX inference or checking tools.
  • Deploy network or application level controls to restrict the acceptance of untrusted model binaries to trusted sources only.

Generated by OpenCVE AI on October 26, 2026 at 18:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-m4pr-6v3c-6fgr ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Onnx
Onnx onnx
Vendors & Products Onnx
Onnx onnx
Type Values Removed Values Added
Description Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
Title ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Weaknesses CWE-195
CWE-476
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-195

    Signed to Unsigned Conversion Error

  • CWE-476

    NULL Pointer Dereference

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 31, 2026, 1:40 AM
Reserved
Oct 23, 2026, 8:21 PM
Status
Awaiting Analysis
Published
Oct 26, 2026, 6:17 PM
Modified
Oct 31, 2026, 2:17 AM
Severity
Moderate
Public date
Oct 26, 2026, 5:28 PM