All vulnerabilities

PyPI

CVE-2026-115922

ONNX: Denial of service via unchecked expansion of packed sub-byte tensors in ONNX Python APIs

Severity
Medium 6.2
Published
28 Oct 2026
Last changed
28 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.22.0
Exploit chance
0.1% in the next 30 daysHigher than 2% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-789
Attack
Needs local access · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Also known as
GHSA-q69g-f4f5-v8m7
Sources
OSV.dev and GitHub

Description

ONNX's Python tensor-materialization helpers could allocate memory according to attacker-controlled tensor dimensions without verifying that a packed sub-byte payload contained the declared number of elements.

A very small model could therefore cause a disproportionately large allocation when an application called onnx.numpy_helper.to_array() or constructed onnx.reference.ReferenceEvaluator with the model. The issue affected UINT2, INT2, UINT4, INT4, and FLOAT4E2M1 tensors stored in either raw_data or packed int32_data.

The vulnerable _unpack_2bit() and _unpack_4bit() paths first allocated a small array based on the available packed bytes, then resized it to the shape declared in TensorProto.dims. They did not first confirm that the payload encoded enough logical elements for that shape.

For example, the reporter demonstrated a 66-byte model containing one packed byte and a declared dimension of 700,000,000.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
onnxPyPI · osv:PyPI:onnx
  • Every version before 1.22.0

About onnx

Weekly downloads (PyPI)
4,009,268PyPI Stats, 23 Nov 2026

References