Skip to main content

ONNX CVE-2026-115921

| EUVDEUVD-2026-110046 MEDIUM
Signed to Unsigned Conversion Error (CWE-195)
2026-10-26 GitHub_M GHSA-m4pr-6v3c-6fgr
6.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious ONNX model with bad num_scan_inputs
  2. Exploit
    Submit model to application's shape inference
  3. Execution
    Trigger null deref or oversized allocation
  4. Impact
    Process crash denies service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Signed/unsigned conversion safety
Exploitation Conditions

The consuming application must perform ONNX shape inference (e.g., onnx.shape_inference.infer_shapes, especially strict_mode) on an untrusted, attacker-supplied model while running ONNX 1.4.0 through 1.21.0, and that model must contain a Scan node whose required num_scan_inputs attribute is either absent (null-pointer dereference) or negative (narrowed to an oversized size_t reaching a vector allocation that raises std::length_error); the vulnerable code paths are ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9. Limiting factors: the vector is local (AV:L) - the attacker must get the crafted model to the library's API or file boundary, as ONNX itself is not network-bound - and the impact is confined to denial of service with no confidentiality or integrity effect. The notable exposure amplifier is that the negative-value model passes onnx.checker.check_model(), so applications using check_model() as a safety gate before inference remain vulnerable. Applications that do not run shape inference on untrusted input are not exposed.

Impact

This is a genuine but bounded issue best treated as a routine patch priority rather than an emergency, consistent with the input Decision label of 'this_month'. The CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 6.2 Medium) is availability-only: no confidentiality or integrity impact was demonstrated, and the impact is a denial of service (process termination via null-pointer dereference, or std::length_error from an oversized allocation). The attack vector is Local (AV:L) because the vulnerable ONNX component processes a malicious model through a library API or file boundary and is not itself bound to a network stack - the vendor explicitly notes that applications exposing ONNX model processing over a network should compute an Environmental score with Modified Attack Vector set to Network, which would raise the real-world score for model-hosting/conversion services. AC:L and PR:N/UI:N are reasonable: no privileges or user interaction are needed to supply a model, and the trigger (a Scan node with a missing or negative num_scan_inputs attribute) is simple and attacker-controlled. No CISA KEV listing is present and no EPSS score was provided in the input, so exploitation-probability signals are absent rather than low; do not treat missing EPSS/KEV as evidence of safety. A particularly important nuance: the negative-value variant passes onnx.checker.check_model() and only fails later during shape inference, so pipelines that rely on check_model() as a validation gate get no protection. Net: a real but medium-severity DoS whose practical urgency depends on whether the consuming application performs shape inference on untrusted models.

Exploit ScenarioDerived

A service that accepts user-uploaded ONNX models (for conversion, optimization, or hosting) runs onnx.shape_inference.infer_shapes on each model. An attacker submits a crafted model containing a Scan node whose required num_scan_inputs attribute is missing (null-pointer dereference) or set to a negative value (converted to a huge size_t, triggering an exceptional oversized allocation); the negative-value model even passes onnx.checker.check_model() first, so a checker-based gate does not block it. The result is termination or disruption of the shape-inference process, denying service; public proof-of-concept trigger models exist in the fix PR's regression tests, though they are reproducers rather than a packaged weaponized exploit.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 26, 2026

Shape inference in the ONNX library (versions 1.4.0 through 1.21.0) mishandles the required Scan attribute num_scan_inputs: an absent attribute is dereferenced as a null pointer, and a negative value is narrowed to an oversized size_t that reaches a vector allocation and raises std::length_error, letting a crafted model crash or disrupt any process that runs onnx.shape_inference.infer_shapes on untrusted input. Only denial of service is demonstrated (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 6.2); the attack is unauthenticated but local in vector terms, since the attacker must deliver the model across the library's API or file boundary rather than over a network stack that ONNX itself exposes. No public exploit code or CISA KEV entry was identified at time of analysis, and the priority decision is 'this_month' - a routine patch rather than an emergency; note that the negative-value model passes onnx.checker.check_model(), so using check_model() as a pre-inference gate does not protect against this issue.

RemediationAI

Vendor-released patch: upgrade to ONNX 1.22.0 or later - this is the only complete fix, and the advisory notes that both reported models were re-tested against the published 1.23.2 wheel and now correctly raise InferenceError. The fix is upstream in PR https://github.com/onnx/onnx/pull/7916 (commit dd6bc92ea39fd2274fd671f0734b0b8b558356f5), which introduces checked narrowing and required-attribute helpers that throw InferenceError instead of dereferencing a null pointer or allocating on a wrapped negative size. Until an upgrade can be shipped, the effective compensating controls are to avoid running shape inference on untrusted models (parse and validate models only from trusted or signed sources, or perform inference in a one-way-isolated subprocess/container with strict CPU and memory limits so a std::length_error or segfault cannot take down the parent service); the trade-off is that skipping shape inference leaves output shapes unresolved for downstream consumers that rely on them, and process isolation limits blast radius but does not remove the crash. Do not rely on onnx.checker.check_model() as a safety gate before inference, because the advisory confirms the negative-value model passes that check. Adopting the upstream helpers getRequiredAttribute/getRequiredAttributeInt and narrow<T>() in any downstream fork or vendored copy of the shape-inference sources is the correct backport path. Advisory: https://github.com/onnx/onnx/security/advisories/GHSA-m4pr-6v3c-6fgr.

Affected VersionsENISA

onnx 1.4.0, < 1.22.0

Affected Packages

pypi onnx fix: 1.22.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ONNX is an open standard and C++ library for machine learning model interchange; models are protobuf graphs whose operators declare attributes, and shape inference walks the graph in InferenceContext, resolving attribute values through ctx.getAttribute(). The vulnerable code in ScanInferenceFunction, ScanInferenceFunction_opset8 and ScanInferenceFunction_opset9 used the pattern narrow_cast<size_t>(ctx.getAttribute("num_scan_inputs")->i()), which neither checks the returned pointer for null (CWE-476) nor rejects a negative signed int64 before converting it to an unsigned size (CWE-195, signed-to-unsigned conversion error). A missing attribute therefore dereferences a null AttributeProto pointer, while a value such as -1 wraps to a very large size_t that is used to size a std::vector, throwing std::length_error from an exceptional allocation path. The fix replaces narrow_cast with a checked narrow<T>() and adds getRequiredAttribute/getRequiredAttributeInt helpers in onnx/defs/shape_inference.h that throw InferenceError on a missing or non-integer attribute and on lossy narrowing; the same upstream PR (#7916) also added a ConvTranspose weight-rank check and a function output-count check that prevent other inference-time crashes. The advisory assigns both triggers to one CVE because they affect the same required attribute, share the same conversion path and fix, and were released together. ONNX is not network-bound, which is why the vector is AV:L; applications that expose model processing over a network are expected to re-score with Modified Attack Vector Network.

Know when Onnx gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 6.2 MEDIUM

Untrusted model reaches the library via a local API/file boundary (AV:L), trigger is a simple malformed attribute needing no privileges or interaction (AC:L/PR:N/UI:N), and impact is DoS only (A:H, C:N/I:N).

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 6.2 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Oct 26, 2026 - 18:18 EUVD
CVE Published
Oct 26, 2026 - 17:28 cve.org
MEDIUM 6.2

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular ML interoperability library, but only ML model-processing pipelines
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Onnx

View all
CVE-2024-5187 HIGH POC
8.8 Jun 06

A vulnerability in the `download_model_with_test_data` function of the onnx/onnx framework, version 1.16.0, allows for a

CVE-2026-49114 MEDIUM POC
6.8 Aug 21

Symlink-following arbitrary file write in ONNX's save_external_data function (onnx/external_data_helper.py) allows a loc

CVE-2024-27319 CRITICAL
9.1 Feb 23

Versions of the package onnx before and including 1.15.0 are vulnerable to Out-of-bounds Read as the ONNX_ASSERT and ONN

CVE-2026-34445 HIGH
8.6 Apr 01

Arbitrary attribute injection in ONNX Python library (versions prior to 1.21.0) allows unauthenticated remote attackers

CVE-2024-27318 HIGH
7.5 Feb 23

Versions of the package onnx before and including 1.15.0 are vulnerable to Directory Traversal as the external_data fiel

CVE-2026-115922 MEDIUM
6.2 Oct 26

Memory exhaustion denial of service in ONNX prior to 1.22.0: the Python tensor-materialization helpers _unpack_2bit() an

CVE-2026-115920 MEDIUM
6.2 Oct 26

Out-of-bounds read in ONNX ConvTranspose shape inference (convTransposeShapeInference and convTransposeShapeInference_op

CVE-2026-115919 MEDIUM
6.2 Oct 26

Out-of-bounds read in ONNX's legacy shape-inference path allows an attacker-supplied model to crash a process that calls

CVE-2026-14647 LOW POC
2.1 Jul 04

Out-of-bounds read in ONNX versions up to 1.21.x exposes limited memory contents to low-privileged remote attackers via

CVE-2026-34447 MEDIUM
5.5 Apr 01

ONNX versions prior to 1.21.0 allow local attackers to read arbitrary files outside the model directory through symlink

CVE-2026-34446 MEDIUM
4.7 Apr 01

ONNX versions prior to 1.21.0 allow local attackers to read arbitrary files by exploiting a hardlink-based path traversa

CVE-2026-11329 LOW
2.0 Jun 05

Weak cache key construction in onnx-mlir's torch backend (versions up to 0.5.0.0) omits tensor data type (dtype) from pl

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy