---
id: "CVE-2026-115919"
kind: "vulnerability"
aliases: ["CVE-2026-115919"]
title: "ONNX: malformed RNN model crashes shape inference on untrusted input"
severity: "medium"
cvss: 6.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["machine-learning", "onnx", "package", "python"]
not_affected_if: ["onnx-1.22.0-or-later", "trusted-models-only"]
published_at: "2026-10-26T18:17:39+00:00"
first_seen_at: "2026-10-26T18:31:43+00:00"
updated_at: "2026-10-26T18:34:07+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115919", "first_seen_at": "2026-10-26T18:31:43+00:00"}]
---

# ONNX: malformed RNN model crashes shape inference on untrusted input

ONNX's shape inference for RNN, LSTM and GRU nodes reads past a protobuf shape when the first input has fewer than three dimensions. Processing an untrusted model can terminate the application that calls infer_shapes().

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `pip show onnx` and confirm the installed version is below `1.22.0`
- Search your code for calls to `onnx.shape_inference.infer_shapes` run on models from outside your organization

## Fix

- Upgrade the `onnx` Python package to `1.22.0` or later
- Validate or reject untrusted models before calling `infer_shapes`

## Timeline

- 2026-10-26T18:31:43+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115919

## From the sources

Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to 1.22.0, RNNShapeInference_opset1_to_6() processes malformed RNN and LSTM nodes from opsets 1 through 6 and GRU nodes from opsets 3 through 6 without verifying that the first input has rank three. The function accesses dim(0) and dim(1) on an undersized protobuf shape, which can read outside the intended repeated field and terminate an application when onnx.shape_inference.infer_shapes() processes an untrusted model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
