Skip to main content

ONNX CVE-2026-63632

| EUVDEUVD-2026-60944 LOW
Out-of-bounds Read (CWE-125)
2026-07-24 https://github.com/onnx/onnx GHSA-p893-rvq9-2xf9 PYSEC-2026-3587
3.3
CVSS 3.1 · Vendor: https://github.com/onnx/onnx

Severity by source

Vendor (https://github.com/onnx/onnx) PRIMARY
3.3 LOW
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
vuln.today AI
4.4 MEDIUM

OOB read leaks adjacent heap bytes into converted output shape, so C:L not C:N; local processing of a crafted file with user-initiated conversion call sets UI:R.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/onnx/onnx).

CVSS VectorVendor: https://github.com/onnx/onnx

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

4
Metadata Corrected
Sep 16, 2026 - 08:40 vuln.today
tag: Buffer Overflow removed
Source Code Evidence Fetched
Jul 26, 2026 - 12:15 vuln.today
Analysis Generated
Jul 26, 2026 - 12:15 vuln.today
CVE Published
Jul 24, 2026 - 15:48 github-advisory
LOW 3.3

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on onnx (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.3.0.

DescriptionCVE.org

Summary

Heap-buffer-overflow READ (16 bytes) in Gemm_7_6::adapt_gemm_7_6() (onnx/version_converter/adapters/gemm_7_6.h:41) when ConvertVersion() processes a model with a Gemm node whose input tensors have fewer than 2 dimensions. The adapter accesses B_shape[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
// gemm_7_6.h:26-42
const auto& A_shape = inputs[0]->sizes();  // May have < 2 elements
const auto& B_shape = inputs[1]->sizes();  // May have < 2 elements

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

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

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

Entry point: onnx.version_converter.convert_version(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 version_converter

poc_b64 = "CAM6rwEKUQoBQQoBQgoBQRIBWSIER2VtbSoPCgVhbHBoYRUBAQA+oAEBKg4KBGJldGEVAAAAOqABASoNCgZ0dGZsc0EYAaABAioNCgZ0cmFuc0IYAKABAhIKb2Vpdl94bWZ2aFoTCgFBEg4KDAgBEggKAggCCgIIA1oTCgFCEg4KDAgBEggKAggcCgIIBFoPCgFCEgoKCAgBEgQKAggbYhMKAVkSDgoMCAESCAoCCAIKAggEQgQKABAH"

model = onnx.load_from_string(base64.b64decode(poc_b64))
# Triggers heap-buffer-overflow in Gemm_7_6 adapter
version_converter.convert_version(model, 6)

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

Impact

Any application that uses onnx.version_converter.convert_version() 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.

AnalysisAI

Heap-buffer-overflow READ in ONNX's Gemm version converter adapter (gemm_7_6.h:41) allows an attacker who can supply a crafted model file to trigger a 16-byte out-of-bounds read when convert_version() downgrades an opset-7 Gemm node whose input tensor B has fewer than 2 dimensions. The vulnerability affects onnx pip package versions 1.3.0 through 1.21.0 and any pipeline that calls onnx.version_converter.convert_version() on untrusted model files. On Release builds the OOB read is silent and the leaked heap bytes propagate into the converted model's output shape metadata, enabling information disclosure; on instrumented builds ASan confirms the 16-byte overread 0 bytes past a 48-byte allocation. No public exploitation confirmed at time of analysis (EPSS 0.17%), though a functional 186-byte PoC is publicly available in the advisory.

Technical ContextAI

ONNX (Open Neural Network Exchange) is a C++ library with Python bindings (pkg:pip/onnx) that defines a portable model format for machine learning. Its version converter subsystem includes per-opset adapter classes (gemm_7_6.h, gemm_6_7.h) that rewrite Gemm operator attributes during opset downgrade or upgrade. The Gemm_7_6::adapt_gemm_7_6() method calls inputs[1]->sizes() to obtain a std::vector<Dimension> representing the B input's shape, then unconditionally indexes B_shape[1] (and A_shape[0]/A_shape[1]) without first asserting that the vector contains at least 2 elements. CWE-125 (Out-of-bounds Read): when the crafted model supplies a 1-dimensional tensor for B (e.g., shape [28]), the vector holds one element and the index-1 access reads 16 bytes of adjacent heap memory - specifically 0 bytes beyond the 48-byte region allocated in tensorShapeProtoToDimensions at ir_pb_converter.cc:216. The same missing rank guard exists in the Gemm_6_7 upward adapter, making both conversion directions vulnerable.

RemediationAI

Upgrade onnx to version 1.22.0 or later via pip install --upgrade onnx; this release adds ONNX_ASSERTM rank checks to both gemm_7_6.h and gemm_6_7.h before any shape index access, making the adapter raise a RuntimeError on malformed input rather than reading out of bounds. The patch is in PR #7880 (commit e9c74f596eaa0250f89e52a54160a25bbcb25b66) at https://github.com/onnx/onnx/pull/7880. If immediate upgrade is not possible, the most effective compensating control is to validate Gemm node input ranks before invoking convert_version(): reject any model where a Gemm node's A or B input has fewer than 2 dimensions using onnx.checker.check_model or a custom pre-flight rank assertion. Blocking untrusted model files at ingestion and running conversion in an isolated subprocess (so a crash does not affect the parent process) are additional hardening measures; note that subprocess isolation prevents heap-data propagation into the calling environment but does not eliminate the OOB read inside the child.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Share

CVE-2026-63632 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy