CVE-2026-63632: ONNX: Heap-Buffer-Overflow READ in Gemm Version Converter Adapter via Undersized Input Shape

Published Jul 24, 2026
·
Updated

Summary

Heap-buffer-overflow READ (16 bytes) in Gemm76::adaptgemm76() (onnx/versionconverter/adapters/gemm76.h:41) when ConvertVersion() processes a model with a Gemm node whose input tensors have fewer than 2 dimensions. The adapter accesses Bshape[1] without checking rank. On Release builds the OOB read is silent; ASan confirms 16-byte read past a 48-byte allocation.

Details

The Gemm 7→6 downgrade adapter reads input shapes without bounds checking: cpp // gemm76.h:26-42 const auto& Ashape = inputs[0]->sizes(); // May have < 2 elements const auto& Bshape = inputs[1]->sizes(); // May have < 2 elements

if (node->hasAttribute(ktransB) && node->i(ktransB) == 1) { MN.emplaceback(Bshape[0]); // OOB if B has 0 dims } else { MN.emplaceback(Bshape[1]); // OOB if B has < 2 dims ← CRASH }

The PoC has input B with shape [28] (1 dimension). Bshape has 1 element. Accessing Bshape[1] reads 16 bytes past the std::vector<Dimension> internal storage into adjacent heap memory.

The same unchecked pattern applies to Ashape[0] and Ashape[1] at lines 34 and 36.

Entry point: onnx.versionconverter.convertversion(model, 6) — different from the InferShapes bugs reported in separate advisories. This triggers during opset downgrade (7→6).

PoC python import base64 import onnx from onnx import versionconverter

pocb64 = "CAM6rwEKUQoBQQoBQgoBQRIBWSIER2VtbSoPCgVhbHBoYRUBAQA+oAEBKg4KBGJldGEVAAAAOqABASoNCgZ0dGZsc0EYAaABAioNCgZ0cmFuc0IYAKABAhIKb2Vpdl94bWZ2aFoTCgFBEg4KDAgBEggKAggCCgIIA1oTCgFCEg4KDAgBEggKAggcCgIIBFoPCgFCEgoKCAgBEgQKAggbYhMKAVkSDgoMCAESCAoCCAIKAggEQgQKABAH"

model = onnx.loadfromstring(base64.b64decode(pocb64))

Triggers heap-buffer-overflow in Gemm76 adapter versionconverter.convertversion(model, 6)

186-byte PoC. ASan confirms: heap-buffer-overflow READ of size 16 at gemm76.h:41, 0 bytes after 48-byte region allocated in tensorShapeProtoToDimensions at irpbconverter.cc:216.

Impact

Any application that uses onnx.versionconverter.convertversion() on untrusted models is vulnerable. This includes model conversion pipelines and tools that auto-downgrade opset versions for compatibility. On Release builds the OOB read is silent — the read value propagates into the converted model's output shape, potentially leaking heap data. On ASan builds it's detected as a heap-buffer-overflow. Could also cause crashes with different heap layouts.

Other sources

Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.3.0 until 1.22.0, onnx.versionconverter.convertversion() can perform an out-of-bounds read in Gemm76::adaptgemm76() in onnx/versionconverter/adapters/gemm76.h when a Gemm node has input tensors with fewer than two dimensions because Bshape[1], Ashape[0], or Ashape[1] is accessed without a rank check, potentially causing a process crash during an opset 7 to 6 downgrade. This issue is fixed in version 1.22.0.

— MITRE

Affected Software

2 affected componentsFixes available
pip/onnx>=1.3.0<=1.21.0
1.22.0
IBM API Connect<=V10.0.8.0 - V10.0.8.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/onnx to a version that resolves this vulnerability.

    Fixed in 1.22.0
  2. Upgrade

    Upgrade onnx.version_converter.convert_version to a version that resolves this vulnerability.

    Fixed in 1.22.0
  3. Compensating control

    Do not run onnx.version_converter.convert_version() (opset 7→6 downgrade) on untrusted ONNX models; only process models from trusted sources to reduce exposure to out-of-bounds reads during Gemm_7_6::adapt_gemm_7_6() when input tensor rank is < 2.

Event History

Jul 24, 2026
Advisory Published
via GitHub·03:48 PM
Data Sourced
via GitHub·03:48 PM
DescriptionSeverityWeaknessAffected Software
Aug 18, 2026
CVE Published
via MITRE·02:55 PM
Data Sourced
via MITRE·02:55 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeakness
Oct 14, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-63632?

CVE-2026-63632 has a severity rating of low at 3.3.

2

What type of vulnerability is CVE-2026-63632?

CVE-2026-63632 is identified as a heap-buffer-overflow vulnerability.

3

How do I fix CVE-2026-63632?

To fix CVE-2026-63632, ensure that input tensors have at least 2 dimensions before accessing B_shape[1].

4

Which software is affected by CVE-2026-63632?

CVE-2026-63632 affects the pip package 'onnx'.

5

What components are involved in CVE-2026-63632?

CVE-2026-63632 involves the Gemm adapter in the version converter of the ONNX library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203