All vulnerabilities

PyPI

CVE-2026-115919

ONNX: Out-of-Bounds Read in RNN/GRU/LSTM Shape Inference (Old Opsets, Missing Rank Check)

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.2% in the next 30 daysHigher than 7% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Out-of-bounds read (CWE-125)
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-48m4-24cq-37qf
Sources
OSV.dev and GitHub

Description

ONNX shape inference performed an out-of-bounds read when processing a malformed RNN, GRU, or LSTM node from opsets 1–6 whose first input had a rank other than three.

RNNShapeInference_opset1_to_6() checked whether the input shape was present but accessed dim(0) and dim(1) without first checking its rank. A crafted model could therefore terminate a process that called onnx.shape_inference.infer_shapes(). The model passed onnx.checker.check_model() before reaching the vulnerable path.

The vulnerable code read dimensions unconditionally:

For an undersized shape, protobuf's repeated-field access read outside the intended array in release builds. The observed result was SIGSEGV; sanitizer and debug builds terminated on a protobuf bounds check.

The newer opset 7–13 and opset 14+ inference paths already required the first input to have rank three and were not affected.

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