ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | onnx | < 1.21.0 | 1.21.0 |
References
- CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N- Weakness (CWE)
CWE-22, CWE-61- Platform
- Python (PyPI)
- Package
onnx- Disclosed
- 01.04.2026
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-2241 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-cmw6-hcpp-c6jp - CC BY 4.0
Vulnerability history: onnx
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 13
- First → latest
- 01.2023 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 7
- Medium 4
- Low 1
Disclosures per year
- 2023: 1
- 2024: 3
- 2025: 1
- 2026: 8
-
ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.