NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2026-115920: ONNX: Out-of-bounds read in ConvTranspose shape inference via undersized weight rank

mediumCVSS 3.1 6.2GHSA-6pwm-x34p-fvj2

ONNX versions 1.2.1 through 1.21.0 crash with a segmentation fault when `onnx.shape_inference.infer_shapes()` processes a crafted model with an undersized ConvTranspose weight tensor. Anyone who runs shape inference on untrusted models is exposed to denial of service. Upgrade to ONNX 1.22.0.

Published Oct 28, 2026 · Analysis Nov 1, 2026

What an attacker can do

ConvTranspose shape inference derives effective_kernel_shape from dimensions 2 onward of the weight tensor when the model sets no kernel_shape attribute. If the weight has fewer than three dimensions, for example shape [1, 3], that vector is empty. The output loop still reads effective_kernel_shape[0] once per spatial input dimension, so an input of shape [1, 1, 5] reads past the end of an empty vector. Both the older convTransposeShapeInference_opset11() and the current implementation had the flaw.

The malicious model passes onnx.checker.check_model(), so a check step does not protect you. The advisory reports a deterministic process crash and no confidentiality or integrity impact. The CVSS vector is local, because ONNX is a library. A model-conversion service, a model-hub scanner or an inference gateway that accepts uploaded models and runs shape inference turns this into a remote crash for whoever can upload a model.

Who is affected

The onnx pip package from 1.2.1 through 1.21.0 is affected. Only code that calls shape inference on a model it did not build is at risk. Check your version:

pip show onnx

Also check lock files and container images for pinned older versions, since many ML toolchains pull in ONNX indirectly.

onnx

Ecosystem
PyPI
Affected
>= 1.2.1, <= 1.21.0
Fixed in
1.22.0
Check
pip show onnx

How to fix it

Upgrade to ONNX 1.22.0 or later:

pip install --upgrade "onnx>=1.22.0"

The fix (pull request 7997) makes convTransposeShapeInference raise an error when the input or weight tensor has fewer than two dimensions, instead of continuing. The reporter re-tested the malformed model against the 1.23.2 wheel, which raises InferenceError. The sources give no workaround. Until you upgrade, run shape inference on untrusted models in a separate, restartable process.

How to tell if you were hit

Look for worker processes that die with SIGSEGV (exit code -11 or 139) while calling infer_shapes(), especially right after a model upload or load. A crash loop on one model file points to this flaw. Keep the offending model and test it against ONNX 1.22.0 or later, which should raise InferenceError instead of crashing.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

ONNX ConvTranspose shape inference performed an out-of-bounds read when the weight tensor had fewer than three dimensions and the model did not provide a kernel_shape attribute.

The inference function derived an empty effective_kernel_shape vector from the undersized weight tensor, then indexed that vector once for each spatial dimension of the input tensor. A crafted model passed onnx.checker.check_model() and caused SIGSEGV when passed to onnx.shape_inference.infer_shapes().

Technical details

For an input shape such as [1, 1, 5], shape inference computes one spatial input dimension. A weight shape such as [1, 3] has no spatial dimensions, so deriving kernel_shape from dimensions 2 onward produces an empty vector. The output loop nevertheless accesses effective_kernel_shape[0].

The defect affected both the older convTransposeShapeInference_opset11() path and the then-current ConvTranspose inference implementation.

Impact

An application that performs shape inference on an untrusted model can be terminated, causing denial of service. The observed result was a deterministic process crash. No confidentiality or integrity impact was demonstrated.

Affected versions

  • Affected: ONNX 1.2.1 through 1.21.0
  • Patched: ONNX 1.22.0

Remediation

Upgrade to ONNX 1.22.0 or later. The fix rejects input and weight tensors with fewer than three dimensions before deriving the spatial kernel shape.

The original malformed model was re-tested against the published ONNX 1.23.2 wheel and correctly raises InferenceError.

Severity

The vulnerable ONNX component processes the malicious model through a local library API or file boundary and is not itself bound to a network stack. Applications that expose ONNX model processing over a network should calculate an Environmental score with Modified Attack Vector set to Network.

Credited to MinicoAI.

Questions

Does onnx.checker.check_model() catch this model?

No. The advisory states that the crafted model passes check_model() and only crashes when passed to onnx.shape_inference.infer_shapes().

Can this lead to code execution?

The advisory demonstrates only a deterministic crash from an out-of-bounds read. It states no confidentiality or integrity impact was shown.

Why is the CVSS attack vector local?

ONNX is a library that handles files through local APIs. The advisory says applications that expose model processing over a network should score the environmental attack vector as Network.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More PyPI vulnerabilities

All PyPI entries