Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted sub-byte ONNX model
-
DeliveryApplication calls to_array() or ReferenceEvaluator
-
ExploitUnpack resizes to attacker-declared dims
-
ExecutionOversized allocation exhausts memory
-
ImpactDenial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
|
| Exploitation Conditions | Exploitation requires the application to actually materialize an untrusted packed sub-byte tensor - one of UINT2, INT2, UINT4, INT4, or FLOAT4E2M1, stored in either raw_data or packed int32_data - by calling onnx.numpy_helper.to_array() or constructing onnx.reference.ReferenceEvaluator on the model. A critical limiting factor confirmed by the advisory: merely loading, running onnx.checker.check_model(), or performing shape inference on the serialized model does NOT trigger the allocation (the malicious 66-byte model passed check_model on vulnerable versions); the vulnerable initializer must be materialized. Because the vector is AV:L, the flaw is reached through a local library API or file boundary; it only becomes remotely reachable if an application exposes ONNX model processing (that materializes tensors) over a network, in which case the vendor advises an Environmental score with Modified Attack Vector: Network. |
| Impact | This is a genuine but bounded issue: a CWE-789 excessive-allocation denial of service, not a high-impact RCE. 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 consistent with the advisory - impact is availability only (C:N/I:N), triggered through a local library API or file boundary rather than a network stack, which is why AV:L is correct. The vendor explicitly notes that network-facing model-processing services should recompute an Environmental score with Modified Attack Vector: Network, so the real risk is higher for any service that accepts untrusted ONNX models remotely. No EPSS score was provided, and there is no CISA KEV listing, so exploitation status is 'no public exploit identified at time of analysis' - note the GHSA describes a reporter proof-of-concept (a 66-byte model expanding to ~700 MB) but the input provides no PoC/exploit-code reference, so this is a described demonstration, not verified public exploit code. There is no SSVC decision vector in the input beyond the vendor-neutral 'this_month' priority label, which aligns with a Medium-severity, availability-only, non-exploited flaw: worth patching on a normal cycle, not an emergency. The main signal to weigh is deployment context: the raw score assumes local access, but ML inference services that materialize uploaded models turn this into a remotely reachable DoS. |
| Exploit ScenarioDerived | An application accepts an untrusted ONNX model and calls onnx.numpy_helper.to_array() or runs onnx.reference.ReferenceEvaluator on it. An attacker submits a tiny model (the reporter demonstrated 66 bytes) whose packed UINT2/INT2/UINT4/INT4/FLOAT4E2M1 initializer declares an enormous TensorProto.dims; materializing it expands the small packed payload into a disproportionately large array and exhausts memory. A reporter PoC demonstration is described in the advisory, but no public exploit-code reference is included in the available data; exploitation requires only local library/file access unless the model-processing is exposed over a network. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 26, 2026
Memory exhaustion denial of service in ONNX prior to 1.22.0: the Python tensor-materialization helpers _unpack_2bit() and _unpack_4bit() resize unpacked arrays to the attacker-declared TensorProto.dims without first verifying that the packed payload actually encodes that many elements, so a tiny model can force a disproportionately large allocation. Applications that call onnx.numpy_helper.to_array() or construct onnx.reference.ReferenceEvaluator with an untrusted UINT2, INT2, UINT4, INT4, or FLOAT4E2M1 tensor (stored in raw_data or packed int32_data) are affected; a 66-byte model declaring 700,000,000 elements allocated roughly 700 MB on vulnerable versions. Merely loading the model, running onnx.checker.check_model(), or running shape inference does not trigger it - the initializer must be materialized. The vendor-rated CVSS vector is AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (6.2, Medium), consistent with a local library/file boundary; no public exploit code or active exploitation is reported in the available data, and the issue is fixed in 1.22.0.
RemediationAI
Vendor-released patch: ONNX 1.22.0 - upgrade with python -m pip install --upgrade "onnx>=1.22.0"; the advisory states the five affected tensor types and both storage formats were re-tested against the published 1.23.2 wheel and are rejected before the oversized allocation. The fix validates the logical element count before resizing (https://github.com/onnx/onnx/pull/8033) and adds a checker-level rejection of undersized packed payloads (https://github.com/onnx/onnx/pull/8038); commit references are 05c1bc3bceceb8d3cf11e9e7fc7f19f971c44988, 8de2cf6aa47928e6515ac6d9e1a8b4758886a7df and dce5876d6cc6cc30157af7d26a752ef44976da8e. Where upgrading is not immediately possible, the actionable compensating control is to stop materializing untrusted models through onnx.numpy_helper.to_array() or onnx.reference.ReferenceEvaluator - note that check_model() alone passed the malicious 66-byte sample on vulnerable versions and therefore is not a mitigation - and to run any unavoidable materialization under an enforced process memory limit (for example a container memory cap or RLIMIT_AS), with the trade-off that legitimate large models may be rejected. Applications that expose ONNX model processing over a network should also recalculate severity with Modified Attack Vector: Network, as the vendor advises.
Affected VersionsENISA
Affected Packages
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 machine-learning interoperability standard whose Python bindings provide tensor helpers and a reference interpreter. ONNX TensorProto stores sub-byte element types (UINT2, INT2, UINT4, INT4 and the 4-bit float FLOAT4E2M1) in a packed representation, either as raw_data bytes (2 or 4 elements per byte, respectively) or as packed int32_data words. The vulnerable code in onnx/numpy_helper.py unpacked the payload into a small NumPy array sized by the bytes actually present and then resized it to the shape declared in TensorProto.dims, without confirming that the payload encoded at least math.prod(dims) logical elements - the CWE-789 (Memory Allocation with Excessive Size Value) class. Because the resize is driven by an untrusted, unvalidated dimension value, a minimal serialized model can request an arbitrarily large allocation. The upstream fix computes expected_elements = math.prod(dims) and raises ValueError when the unpacked array is smaller than the declared shape, applied to both _unpack_4bit() and _unpack_2bit(); a complementary checker change rejects undersized packed payloads earlier. Per the advisory, neither memory corruption nor code execution was demonstrated; the impact is limited to availability (A:H) with no confidentiality or integrity effect, and the affected component is not bound to a network stack.
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
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Reached through a local library API/file boundary (AV:L), no auth or interaction to call to_array on a supplied model (PR:N/UI:N), availability-only memory exhaustion so C:N/I:N/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to 1.22.0, _unpack_2bit() and _unpack_4bit() resize unpacked arrays according to attacker-controlled TensorProto.dims without verifying that raw_data or int32_data encodes the declared number of elements. Materializing an untrusted UINT2, INT2, UINT4, INT4, or FLOAT4E2M1 tensor through onnx.numpy_helper.to_array() or onnx.reference.ReferenceEvaluator can therefore expand a small packed payload into a disproportionately large allocation and exhaust memory. This issue is fixed in version 1.22.0.
Blast Radius
ecosystem impact- 58 pypi packages depend on onnx (25 direct, 33 indirect)
Ecosystem-wide dependent count for version 1.22.0.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
A vulnerability in the `download_model_with_test_data` function of the onnx/onnx framework, version 1.16.0, allows for a
Symlink-following arbitrary file write in ONNX's save_external_data function (onnx/external_data_helper.py) allows a loc
Versions of the package onnx before and including 1.15.0 are vulnerable to Out-of-bounds Read as the ONNX_ASSERT and ONN
Arbitrary attribute injection in ONNX Python library (versions prior to 1.21.0) allows unauthenticated remote attackers
Versions of the package onnx before and including 1.15.0 are vulnerable to Directory Traversal as the external_data fiel
Shape inference in the ONNX library (versions 1.4.0 through 1.21.0) mishandles the required Scan attribute num_scan_inpu
Out-of-bounds read in ONNX ConvTranspose shape inference (convTransposeShapeInference and convTransposeShapeInference_op
Out-of-bounds read in ONNX's legacy shape-inference path allows an attacker-supplied model to crash a process that calls
Out-of-bounds read in ONNX versions up to 1.21.x exposes limited memory contents to low-privileged remote attackers via
ONNX versions prior to 1.21.0 allow local attackers to read arbitrary files outside the model directory through symlink
ONNX versions prior to 1.21.0 allow local attackers to read arbitrary files by exploiting a hardlink-based path traversa
Weak cache key construction in onnx-mlir's torch backend (versions up to 0.5.0.0) omits tensor data type (dtype) from pl
EUVD-2026-110049
GHSA-q69g-f4f5-v8m7
NVD
CVE.org
EPSS
Exploit-DB