Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
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.
Primary rating from Vendor (https://github.com/onnx/onnx).
CVSS VectorVendor: https://github.com/onnx/onnx
Lifecycle Timeline
4Blast Radius
ecosystem impact- 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:
// 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
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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-60944
GHSA-p893-rvq9-2xf9