CVE-2026-34446: 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 issymlink() and never checks the inode or stnlink, 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.
Other sources
ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load
— Microsoft
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/onnxto a version that resolves this vulnerability.Fixed in 1.21.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.2.2-14 - Upgrade
Upgrade
onnx.loadto a version that resolves this vulnerability.Fixed in 1.21.0