4.7medium
ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load
- Severity
- 4.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.21% (higher than 11% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-cmw6-hcpp-c6jpPYSEC-2026-2241
Description
Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to version 1.21.0, there is an issue in onnx.load, the code checks for symlinks to prevent path traversal, but completely misses hardlinks because a hardlink looks exactly like a regular file on the filesystem. 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 | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N |
| GitHub | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
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, there is an issue in onnx.load, the code checks for symlinks to prevent path traversal, but completely misses hardlinks because a hardlink looks exactly like a regular file on the filesystem. This issue has been patched in version 1.21.0.
GitHub Advisory Database
Summary
The issue is in onnx.load — the code checks for symlinks to prevent path traversal, but completely misses hardlinks, which is the problem, since a hardlink looks exactly like a regular file on the filesystem.
The Real Problem
The validator in onnx/checker.cc only calls is_symlink() and never checks the inode or st_nlink, so a hardlink walks right through every security check without any issues.
Impact
Especially dangerous in AI supply chain scenarios like HuggingFace — a single malicious model is enough to silently steal secrets from the victim's machine without them noticing anything.
References
| https://github.com/onnx/onnx/security/advisories/GHSA-cmw6-hcpp-c6jp | advisory, vendor-advisory, web | |
| https://github.com/onnx/onnx/commit/4755f8053928dce18a61db8fec71b69c74f786cb | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-34446 | advisory | |
| https://github.com/onnx/onnx | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34446 changed 2026-04-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cmw6-hcpp-c6jp changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-34446 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2241 changed 2026-07-13 | CC-BY-4.0 |