Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft ONNX model with 1D Gemm B tensor
-
DeliveryDeliver model to conversion pipeline
-
ExploitPipeline calls convert_version(model, 6)
-
ExecutionGemm_7_6 adapter reads B_shape[1] out of bounds
-
PersistHeap bytes silently embedded in output model shape metadata
-
ImpactCaller receives info-leaking converted model
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The target application must call onnx.version_converter.convert_version(model, 6) or convert_version(model, 7) (either opset-direction adapter is affected) on an attacker-controlled ONNX model. The model must contain a Gemm node where at least one of inputs A or B has fewer than 2 dimensions - specifically, B must have rank < 2 for the gemm_7_6.h:41 crash, or A must have rank < 2 for the lines-34/36 paths. The vulnerability is entirely isolated to the version converter path and does NOT trigger during ONNX model inference, shape inference (InferShapes), or model loading without conversion. No authentication, special OS privileges, or non-default runtime configuration is required beyond access to call convert_version() with a crafted model. The attack is limited by the requirement for user-invoked conversion: the victim process must actively call convert_version on an attacker-supplied file rather than simply loading or running it. |
| Impact | The provided CVSS 3.3 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L) correctly captures local attack surface and user-interaction requirement but understates confidentiality impact: the advisory explicitly states that on Release builds the OOB-read value propagates into the converted model's output shape, constituting a heap information leak - C:L is more appropriate than C:N and is consistent with the 'Information Disclosure' tag. EPSS at 0.17%/6th percentile reflects genuinely low real-world exploitation activity, and the vulnerability is not in the CISA KEV catalog, but a functional PoC is publicly available in the GHSA advisory, so the exploitation barrier is essentially zero for any attacker already in a position to supply model files. The practical risk is confined to ML model conversion pipelines that ingest externally sourced ONNX models, a narrow but real attack surface in MLOps environments; even a mid-sized operator in opole running an automated opset-downgrade pipeline for legacy hardware compatibility would be exposed if user-supplied models are processed without pre-validation. The real-world threat is primarily heap disclosure leaking internal allocator metadata into output model files, not immediate code execution. |
| Exploit ScenarioDerived | An attacker crafts a minimal ONNX model file (as demonstrated by the 186-byte PoC in the advisory) containing a Gemm node with input B declared as a 1-dimensional tensor of shape [28]. When a model conversion service or CI/CD pipeline calls version_converter.convert_version(model, 6), the Gemm_7_6 adapter indexes B_shape[1] and reads 16 bytes of adjacent heap memory; on Release builds this data is silently incorporated into the converted model's output shape and returned to the caller, leaking allocator or application data. A public PoC confirms the trigger is reliable. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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.
Blast Radius
ecosystem impact- 2 pypi packages depend on onnx (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 1.3.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
EUVD-2026-60944
GHSA-p893-rvq9-2xf9
NVD
CVE.org
EPSS
Exploit-DB