Description
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.
Published: 2026-10-26
Score: 6.2 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service (memory exhaustion)
Action: Immediate Patch
AI Analysis

Impact

The vulnerability resides in the unpacking functions _unpack_2bit() and _unpack_4bit() within ONNX's Python API. These functions calculate the size of the output array directly from the TensorProto.dimensions field without checking that the raw data actually matches the declared number of elements. An attacker controlling a TensorProto can specify an inflated dim size that causes to_array() or the ReferenceEvaluator to allocate a gigantic array while the packed payload remains small. This leads to a denial‑of‑service condition by exhausting system memory. The weakness is classified as CWE‑789 (Memory Allocation Errors).

Affected Systems

ONNX versions older than 1.22.0 deployed with the Python APIs onnx.numpy_helper or onnx.reference are affected. Any application loading untrusted ONNX models through these APIs is at risk.

Risk and Exploitability

The CVSS score is 6.2, indicating a moderate severity. No EPSS value is available, but the absence in CISA's KEV catalog suggests limited public exploitation. A successful exploit requires the attacker to supply a crafted TensorProto that declares large dimensions but contains a small packed payload. Once materialized, the process will consume excessive memory, potentially crashing or slowing the host. The attack is local or remote depending on how the untrusted ONNX model is introduced; typical vectors include model ingestion by services, web endpoints, or file upload mechanisms.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ONNX to version 1.22.0 or later, which fixes the unchecked dimension check in unpacking functions.
  • If immediate upgrade is not possible, avoid processing untrusted ONNX models with onnx.numpy_helper.to_array() or ReferenceEvaluator; restrict to trusted internal models only.
  • Validate the size of the raw data or the number of elements declared in any TensorProto before calling unpack functions—implement custom size checks if your environment must handle untrusted models.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 19:15:00 +0000

Type Values Removed Values Added
First Time appeared Onnx
Onnx onnx
Vendors & Products Onnx
Onnx onnx

Mon, 26 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
Description 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.
Title ONNX: Denial of service via unchecked expansion of packed sub-byte tensors in ONNX Python APIs
Weaknesses CWE-789
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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-26T17:31:03.716Z

Reserved: 2026-10-23T20:21:45.107Z

Link: CVE-2026-115922

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-26T18:17:40.163

Modified: 2026-10-26T18:34:17.050

Link: CVE-2026-115922

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T19:00:08Z

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value