Advisory

GHSA-cmw6-hcpp-c6jp

Also known as: CVE-2026-34446, PYSEC-2026-2241

Summary

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

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-04-01 21:13 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

onnx

PyPI · All systems

Affected

  • introduced 0, fixed 1.21.0 (ecosystem)

Fixed versions

1.21.0

Fix

  • Fixed version 1.21.0
    pip install --upgrade onnx==1.21.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences