8.6high
ONNX: Malicious ONNX models can crash servers by exploiting unprotected object settings.
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.34% (higher than 29% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-538c-55jv-c5g9PYSEC-2026-2240
Description
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to version 1.21.0, the ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. It didn’t check if the "keys" in the file were valid. Due to this, an attacker could craft a malicious model that overwrites internal object properties. This issue has been patched in version 1.21.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| onnx onnx | < 1.21.0 | CVE List |
| onnx (PyPI) | before 1.21.0 | GitHub Advisory Database, PyPA Advisory Database |
| linuxfoundation onnx | before 1.21.0 | NVD |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H |
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H |
| PyPA Advisory Database | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H |
Classification
What each source says
CVE List
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to version 1.21.0, the ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. It didn’t check if the "keys" in the file were valid. Due to this, an attacker could craft a malicious model that overwrites internal object properties. This issue has been patched in version 1.21.0.
GitHub Advisory Database
Summary
The ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. The problem? It didn’t check if the "keys" in the file were valid. Because it blindly trusted the file, an attacker could craft a malicious model that overwrites internal object properties.
Why its Dangerous
Instant Crash DoS: An attacker can set the length property to a massive number like 9 petabytes. When the system tries to load the model, it attempts to allocate all that RAM at once, causing the server to crash or freeze Out of Memory.
Access Bypass: By setting a negative offset -1, an attacker can trick the system into reading parts of a file it wasn't supposed to touch.
Object Corruption: Attackers can even inject "dunder" attributes like class to change the object's type entirely, which could lead to more complex exploits.
Fixed: https://github.com/onnx/onnx/pull/7751 object state corruption and DoS via ExternalDataInfo attribute injection
References
| https://github.com/onnx/onnx/security/advisories/GHSA-538c-55jv-c5g9 | fix, patch, vendor-advisory, web | |
| https://github.com/onnx/onnx/pull/7751 | fix, issue-tracking, patch, web | |
| https://github.com/onnx/onnx/commit/e30c6935d67cc3eca2fa284e37248e7c0036c46b | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-34445 | advisory | |
| https://github.com/onnx/onnx | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34445 changed 2026-04-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-538c-55jv-c5g9 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-34445 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2240 changed 2026-07-13 | CC-BY-4.0 |