INCIDENT MAP

Browse / Unsafe Model Loading and Supply Chain / CVE-2026-34446

ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load

CVE-2026-34446 · 2026-04-01 moderate

Class
Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
Technique
Path traversal and file access
Affected
onnx (PyPI)
Gets past
Path restriction
CVSS
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
EPSS
0.2% chance of exploitation in 30 days

How it works, in short

A model's external data reference points to a hardlink, which passes the symlink-only check, so loading the model can read arbitrary local files. (Our summary, written by a model. The source text is below.)

Details

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

Source: GitHub Advisory Database, used under CC BY 4.0.