Medium

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

  • Disclosed: 01.04.2026
  • Updated: 11.10.2026 15:17

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.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) onnx < 1.21.0 1.21.0

References

CVSS score 4.7/10
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.

All (13) in the archive
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

  1. 2023: 1
  2. 2024: 3
  3. 2025: 1
  4. 2026: 8
Severity:
  1. High · 7.1 CVE-2026-49114 < 1.21.0 1.21.0
  2. ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load this entry
    Medium · 4.7 CVE-2026-34446 < 1.21.0 1.21.0
  3. High CVE-2026-27489 < 1.21.0 1.21.0
  4. High · 7.5 CVE-2024-27318 < 1.16.0 1.16.0

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.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.