CVE-2026-34446: ONNX Arbitrary File Read Vulnerability

MODERATE
Advisory Identifier: GHSA-cmw6-hcpp-c6jp
CVSS 4.7
CWE-61 CWE-22
Published
Advisory Summary

CVE-2026-34446 is a MODERATE (CVSS 4.7) arbitrary file read vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting ONNX libraries in the PyPI ecosystem. The issue involves arbitrary file read via externaldata hardlink bypass in onnx load. Remediation is available by upgrading affected packages to version 1.21.0.

CVE-2026-34446 at a Glance

CVE Identifier CVE-2026-34446
GHSA Identifier GHSA-cmw6-hcpp-c6jp
Severity MODERATE
CVSS v3.1 Base Score 4.7
CWE Classification CWE-61: UNIX Symbolic Link (Symlink) Following
Affected Product ONNX
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-34446

To remediate this vulnerability, upgrade all affected ONNX dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

onnx fixed: 1.21.0
pip install onnx>=1.21.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show onnx

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-34446, inspect your installed packages using pip:

pip show onnx

Analyze the terminal output to locate any version of ONNX in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.0), your application is affected.

Note: The pip show onnx command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In ONNX, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-34446 Affected ONNX Versions

1 component(s)
Fixed Versions:
1.21.0
Product / Package Ecosystem Affected Versions Fixed Version
onnx
PyPI
< 1.21.0
1.21.0

References

Frequently Asked Questions

What is CVE-2026-34446?
CVE-2026-34446 is a security vulnerability in ONNX involving Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load under CWE-61: UNIX Symbolic Link (Symlink) Following.
Which ONNX versions are affected?
Affected versions include releases prior to 1.21.0 across affected packages: onnx.
What version fixes CVE-2026-34446?
Upgrading to 1.21.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is onnx affected?
Yes, onnx is affected in releases prior to 1.21.0. Upgrade your dependency to 1.21.0 or later.
What is the CVSS score of CVE-2026-34446?
CVE-2026-34446 has a CVSS v3.1 base score of 4.7 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-34446?
CVE-2026-34446 is classified under CWE-61: UNIX Symbolic Link (Symlink) Following (The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.).
How can I check PyPI dependencies for CVE-2026-34446?
Run the dependency tree command: 'pip show onnx'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cmw6-hcpp-c6jp",
  "modified" : "2026-04-01T21:13:37Z",
  "published" : "2026-04-01T21:13:37Z",
  "aliases" : [ "CVE-2026-34446" ],
  "summary" : "ONNX: Arbitrary File Read via ExternalData Hardlink Bypass in ONNX load",
  "details" : "### Summary\nThe 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.\n\n### The Real Problem\nThe 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.\n\n### Impact\nEspecially 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" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "onnx"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.21.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.20.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/security/advisories/GHSA-cmw6-hcpp-c6jp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34446"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/commit/4755f8053928dce18a61db8fec71b69c74f786cb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/onnx/onnx"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-61" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T21:13:37Z",
    "nvd_published_at" : "2026-04-01T18:16:30Z"
  }
}