GHSA-M4PR-6V3C-6FGR
Vulnerability from github – Published: 2026-10-28 21:16 – Updated: 2026-10-28 21:16Summary
ONNX shape inference did not safely validate the required Scan num_scan_inputs attribute. Two malformed values could terminate or disrupt the process:
- If the attribute was missing,
ctx.getAttribute("num_scan_inputs")returned null and was dereferenced. - If the attribute was negative, conversion to
size_tproduced a very large value that reached a vector allocation and raisedstd::length_error.
The negative-value variant passed onnx.checker.check_model() before reaching shape inference.
Technical details
The vulnerable Scan inference implementations used the following pattern:
auto num_scan_inputs =
narrow_cast<size_t>(ctx.getAttribute("num_scan_inputs")->i());
This code neither checked the returned pointer nor rejected a negative signed value before converting it to an unsigned size. The pattern was present in the current Scan inference function and the older opset 8 and 9 paths.
The fix uses the required-attribute helper and checked narrowing:
auto num_scan_inputs =
narrow<size_t>(getRequiredAttributeInt(ctx, "num_scan_inputs"));
Impact
An application that performs shape inference on an untrusted model can be terminated or forced into an exceptional allocation path, causing denial of service. No confidentiality or integrity impact was demonstrated.
Affected versions
- Affected: ONNX 1.4.0 through 1.21.0
- Patched: ONNX 1.22.0
ONNX 1.4.0 is the first release containing the vulnerable Scan shape-inference implementation.
Remediation
Upgrade to ONNX 1.22.0 or later.
- Fix: onnx/onnx#7916
- Commit:
dd6bc92ea
Both reported models were re-tested against the published ONNX 1.23.2 wheel and correctly raise InferenceError.
Severity
The vulnerable ONNX component processes the malicious model through a local library API or file boundary and is not itself bound to a network stack. Applications that expose ONNX model processing over a network should calculate an Environmental score with Modified Attack Vector set to Network.
The two triggers remain in one advisory because they affect the same required attribute, share the same unsafe conversion path and remediation, and were fixed in the same release.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.21.0"
},
"package": {
"ecosystem": "PyPI",
"name": "onnx"
},
"ranges": [
{
"events": [
{
"introduced": "1.4.0"
},
{
"fixed": "1.22.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-115921"
],
"database_specific": {
"cwe_ids": [
"CWE-195",
"CWE-476"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-28T21:16:30Z",
"nvd_published_at": "2026-10-26T18:17:39Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nONNX shape inference did not safely validate the required Scan `num_scan_inputs` attribute. Two malformed values could terminate or disrupt the process:\n\n1. If the attribute was missing, `ctx.getAttribute(\"num_scan_inputs\")` returned null and was dereferenced.\n2. If the attribute was negative, conversion to `size_t` produced a very large value that reached a vector allocation and raised `std::length_error`.\n\nThe negative-value variant passed `onnx.checker.check_model()` before reaching shape inference.\n\n## Technical details\n\nThe vulnerable Scan inference implementations used the following pattern:\n\n```cpp\nauto num_scan_inputs =\n narrow_cast\u003csize_t\u003e(ctx.getAttribute(\"num_scan_inputs\")-\u003ei());\n```\n\nThis code neither checked the returned pointer nor rejected a negative signed value before converting it to an unsigned size. The pattern was present in the current Scan inference function and the older opset 8 and 9 paths.\n\nThe fix uses the required-attribute helper and checked narrowing:\n\n```cpp\nauto num_scan_inputs =\n narrow\u003csize_t\u003e(getRequiredAttributeInt(ctx, \"num_scan_inputs\"));\n```\n\n## Impact\n\nAn application that performs shape inference on an untrusted model can be terminated or forced into an exceptional allocation path, causing denial of service. No confidentiality or integrity impact was demonstrated.\n\n## Affected versions\n\n- Affected: ONNX 1.4.0 through 1.21.0\n- Patched: ONNX 1.22.0\n\nONNX 1.4.0 is the first release containing the vulnerable Scan shape-inference implementation.\n\n## Remediation\n\nUpgrade to ONNX 1.22.0 or later.\n\n- Fix: [onnx/onnx#7916](https://github.com/onnx/onnx/pull/7916)\n- Commit: [`dd6bc92ea`](https://github.com/onnx/onnx/commit/dd6bc92ea39fd2274fd671f0734b0b8b558356f5)\n\nBoth reported models were re-tested against the published ONNX 1.23.2 wheel and correctly raise `InferenceError`.\n\n## Severity\n\nThe vulnerable ONNX component processes the malicious model through a local library API or file boundary and is not itself bound to a network stack. Applications that expose ONNX model processing over a network should calculate an Environmental score with Modified Attack Vector set to Network.\n\nThe two triggers remain in one advisory because they affect the same required attribute, share the same unsafe conversion path and remediation, and were fixed in the same release.",
"id": "GHSA-m4pr-6v3c-6fgr",
"modified": "2026-10-28T21:16:30Z",
"published": "2026-10-28T21:16:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/onnx/onnx/security/advisories/GHSA-m4pr-6v3c-6fgr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115921"
},
{
"type": "WEB",
"url": "https://github.com/onnx/onnx/pull/7916"
},
{
"type": "WEB",
"url": "https://github.com/onnx/onnx/commit/dd6bc92ea39fd2274fd671f0734b0b8b558356f5"
},
{
"type": "PACKAGE",
"url": "https://github.com/onnx/onnx"
},
{
"type": "WEB",
"url": "https://github.com/onnx/onnx/releases/tag/v1.22.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.