CVE-2026-63632: ONNX Heap-Buffer-Overflow READ Vulnerability
LOWCVE-2026-63632 is a LOW (CVSS 3.3) heap-buffer-overflow read vulnerability (CWE-125: Out-of-bounds Read) affecting ONNX libraries in the PyPI ecosystem. The issue involves heap-buffer-overflow read in gemm version converter adapter via undersized input shape. Remediation is available by upgrading affected packages to version 1.22.0.
CVE-2026-63632 at a Glance
Security Impact
CVSS: 3.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-63632
To remediate this vulnerability, upgrade all affected ONNX dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install onnx>=1.22.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show onnx
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-63632, inspect your installed packages using pip:
pip show onnx
Analyze the terminal output to locate any version of ONNX in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.22.0), your application is affected.
Note: The pip show onnx command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In ONNX, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-63632 Affected ONNX Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
onnx
|
PyPI |
≥ 1.3.0
< 1.22.0
|
1.22.0
|
References
Frequently Asked Questions
What is CVE-2026-63632?
Which ONNX versions are affected?
What version fixes CVE-2026-63632?
Is onnx affected?
What is the CVSS score of CVE-2026-63632?
What CWE is associated with CVE-2026-63632?
How can I check PyPI dependencies for CVE-2026-63632?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p893-rvq9-2xf9",
"modified" : "2026-07-24T15:48:04Z",
"published" : "2026-07-24T15:48:04Z",
"aliases" : [ "CVE-2026-63632" ],
"summary" : "ONNX: Heap-Buffer-Overflow READ in Gemm Version Converter Adapter via Undersized Input Shape",
"details" : "### Summary\n\nHeap-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.\n\n### Details\n\nThe Gemm 7→6 downgrade adapter reads input shapes without bounds checking:\n```cpp\n// gemm_7_6.h:26-42\nconst auto& A_shape = inputs[0]->sizes(); // May have < 2 elements\nconst auto& B_shape = inputs[1]->sizes(); // May have < 2 elements\n\nif (node->hasAttribute(ktransB) && node->i(ktransB) == 1) {\n MN.emplace_back(B_shape[0]); // OOB if B has 0 dims\n} else {\n MN.emplace_back(B_shape[1]); // OOB if B has < 2 dims ← CRASH\n}\n```\n\nThe 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.\n\nThe same unchecked pattern applies to `A_shape[0]` and `A_shape[1]` at lines 34 and 36.\n\n**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).\n\n### PoC\n```python\nimport base64\nimport onnx\nfrom onnx import version_converter\n\npoc_b64 = \"CAM6rwEKUQoBQQoBQgoBQRIBWSIER2VtbSoPCgVhbHBoYRUBAQA+oAEBKg4KBGJldGEVAAAAOqABASoNCgZ0dGZsc0EYAaABAioNCgZ0cmFuc0IYAKABAhIKb2Vpdl94bWZ2aFoTCgFBEg4KDAgBEggKAggCCgIIA1oTCgFCEg4KDAgBEggKAggcCgIIBFoPCgFCEgoKCAgBEgQKAggbYhMKAVkSDgoMCAESCAoCCAIKAggEQgQKABAH\"\n\nmodel = onnx.load_from_string(base64.b64decode(poc_b64))\n\n# Triggers heap-buffer-overflow in Gemm_7_6 adapter\nversion_converter.convert_version(model, 6)\n```\n\n186-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`.\n\n### Impact\n\nAny 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "onnx"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3.0"
}, {
"fixed" : "1.22.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.21.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/onnx/onnx/security/advisories/GHSA-p893-rvq9-2xf9"
}, {
"type" : "WEB",
"url" : "https://github.com/onnx/onnx/pull/7880"
}, {
"type" : "WEB",
"url" : "https://github.com/onnx/onnx/commit/e9c74f596eaa0250f89e52a54160a25bbcb25b66"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/onnx/onnx"
}, {
"type" : "WEB",
"url" : "https://github.com/onnx/onnx/releases/tag/v1.22.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T15:48:04Z",
"nvd_published_at" : null
}
}