CVE-2026-34446
JSON

4.7medium

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

Severity
4.7medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cmw6-hcpp-c6jpPYSEC-2026-2241

Description

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.

Affected

Product or packageVersionsReported by
onnx onnx< 1.21.0CVE List
onnx (PyPI)before 1.21.0GitHub Advisory Database, PyPA Advisory Database
linuxfoundation onnxbefore 1.21.0NVD

All scores

GitHub_M4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
GitHub4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
PyPA Advisory Database5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Classification

CWE-22CWE-61

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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

Sources

SourceRecordLicence
CVE ListCVE-2026-34446 changed 2026-04-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-cmw6-hcpp-c6jp changed 2026-09-10CC-BY-4.0
NVDCVE-2026-34446 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-2241 changed 2026-07-13CC-BY-4.0