PyPI
CVE-2026-115921
ONNX: Null Pointer Dereference in ScanInferenceFunction Due to Missing Required Attribute
- Severity
- Medium 6.2
- Published
- 28 Oct 2026
- Last changed
- 28 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 1.22.0
- Exploit chance
- 0.1% in the next 30 daysHigher than 2% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-m4pr-6v3c-6fgr
- Sources
- OSV.dev and GitHub
Description
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_t produced a very large value that reached a vector allocation and raised std::length_error.
The negative-value variant passed onnx.checker.check_model() before reaching shape inference.
The vulnerable Scan inference implementations used the following pattern:
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:
Affected software
| Software | Affected versions |
|---|---|
onnxPyPI · osv:PyPI:onnx |
|
About onnx
- Weekly downloads (PyPI)
- 4,009,268PyPI Stats, 23 Nov 2026
Vulnerabilities in onnx
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-115920ONNX: Out-of-bounds read in ConvTranspose shape inference via undersized weight rankMedium 6.2 28 Oct 2026
- CVE-2026-115922ONNX: Denial of service via unchecked expansion of packed sub-byte tensors in ONNX Python APIsMedium 6.2 28 Oct 2026
- CVE-2026-115919ONNX: Out-of-Bounds Read in RNN/GRU/LSTM Shape Inference (Old Opsets, Missing Rank Check)Medium 6.2 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-115921
- GitHub Advisory Database https://github.com/advisories/GHSA-m4pr-6v3c-6fgr