CVE-2026-115921
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.2
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
CVE-2026-115921- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-195, CWE-476
- Updated
- 2026-11-02
EUVDEUVD-2026-110046
6.2
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
EUVD-2026-110046- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-m4pr-6v3c-6fgr
6.2
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Summary
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.
- Record
GHSA-m4pr-6v3c-6fgr- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-195, CWE-476
- Updated
- 2026-11-02
NVD
6.2
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
CVE-2026-115921- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-195, CWE-476
- Updated
- 2026-11-02
OSV
6.2
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
CVE-2026-115921- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-195, CWE-476
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-115921
6.2
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
DEBIAN-CVE-2026-115921- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-m4pr-6v3c-6fgr
6.2
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
Summary
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.
- Record
GHSA-m4pr-6v3c-6fgr- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-195, CWE-476
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-115921
6.2
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
UBUNTU-CVE-2026-115921- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVAZL-112163 No score
CVE-2026-115921 affecting package pytorch 2.2.2-17
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. From 1.4.0 until 1.22.0, ScanInferenceFunction, ScanInferenceFunction_opset8, and ScanInferenceFunction_opset9 do not safely validate the required num_scan_inputs attribute. A missing attribute is dereferenced as a null pointer, while a negative value is converted to size_t and can reach an exceptional oversized allocation path. An untrusted model can therefore terminate or disrupt shape inference, including a negative-value model that can pass onnx.checker.check_model(). This issue is fixed in version 1.22.0.
- Record
AZL-112163- Updated
- 2026-11-05
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
onnxPyPI |
1.4.0 to 1.21.0 | 1.22.0 |
pytorchAzure Linux:3 |
through 2.2.2-17 | None known |
onnxDebian:12 |
All versions, plus listed versions 1.12.0-21.13.1-11.13.1-21.13.1-31.14.1-1 Show 16 moreShow less1.14.1-21.14.1-2.11.14.1-2.1~exp11.16.1-11.16.2-11.17.0-11.17.0-21.17.0-31.19.1-1~exp11.20.0-11.20.0-1~exp11.20.0-31.20.0-41.20.0-51.20.0-61.21.0-1 |
None known |
onnxDebian:13 |
All versions, plus listed versions 1.17.0-31.19.1-1~exp11.20.0-11.20.0-1~exp11.20.0-3 Show 4 moreShow less1.20.0-41.20.0-51.20.0-61.21.0-1 |
None known |
onnxDebian:14 |
All versions, plus listed versions 1.17.0-31.19.1-1~exp11.20.0-11.20.0-1~exp11.20.0-3 Show 4 moreShow less1.20.0-41.20.0-51.20.0-61.21.0-1 |
None known |
onnxPyPI |
1.4.0 up to 1.22.0, plus listed versions 1.10.01.10.11.10.21.11.01.12.0 Show 32 moreShow less1.13.01.13.11.14.01.14.11.15.01.16.01.16.11.16.21.17.01.18.01.19.01.19.11.19.1rc11.20.01.20.0rc11.20.0rc21.20.11.20.1rc11.21.01.21.0rc11.21.0rc21.21.0rc31.21.0rc41.22.0rc11.22.0rc21.4.11.5.01.6.01.7.01.8.01.8.11.9.0 |
1.22.0 |
onnxUbuntu:22.04:LTS |
All versions, plus listed versions 1.7.0+dfsg-3build11.7.0+dfsg-3build21.7.0+dfsg-3ubuntu11.7.0+dfsg-3ubuntu2 |
None known |
onnxUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 1.13.1-31.13.1-3build11.14.1-21.14.1-2.11.14.1-2.1build11.14.1-2.1build21.14.1-2.1ubuntu0.1~esm1 |
None known |
onnxUbuntu:26.10 |
All versions, plus listed versions 1.20.0-11.20.0-6 |
None known |
onnxUbuntu:26.04:LTS |
All versions, plus listed versions 1.17.0-3build11.20.0-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-115921 is a medium vulnerability (CVSS 6.2) in Onnx, published October 26, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in onnx 1.22.0.
References
github.com/onnx/onnx/security/advisories/GHSA-m4pr-6v3c-6fgr
github.com/onnx/onnx/pull/7916
github.com/onnx/onnx/commit/dd6bc92ea39fd2274fd671f0734b0b8b558356f5
github.com/onnx/onnx/releases/tag/v1.22.0
nvd.nist.gov/vuln/detail/CVE-2026-115921
github.com/advisories/GHSA-m4pr-6v3c-6fgr
Show 9 moreShow less
github.com/CVEProject/cvelistV5/tree/main/cves/2026/115xxx/CVE-2026-115921.json
security-tracker.debian.org/tracker/CVE-2026-115921
github.com/onnx/onnx
ubuntu.com/security/CVE-2026-115921
cve.org/CVERecord?id=CVE-2026-115921
github.com/cveproject/cvelistv5/tree/main/cves/2026/115xxx/cve-2026-115921.json
github.com/onnx/onnx/security/advisories/ghsa-m4pr-6v3c-6fgr
nvd.nist.gov/vuln/detail/cve-2026-115921
security-tracker.debian.org/tracker/cve-2026-115921