CVE-2026-34445: ONNX Malicious ONNX Models Can Crash Vulnerability

HIGH
Advisory Identifier: GHSA-538c-55jv-c5g9
CVSS 8.6
CWE-400 CWE-20 CWE-915
Published
Advisory Summary

CVE-2026-34445 is a HIGH (CVSS 8.6) malicious onnx models can crash vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting ONNX libraries in the PyPI ecosystem. The issue involves malicious onnx models can crash servers by exploiting unprotected object settings.. Remediation is available by upgrading affected packages to version 1.21.0.

CVE-2026-34445 at a Glance

CVE Identifier CVE-2026-34445
GHSA Identifier GHSA-538c-55jv-c5g9
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product ONNX
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.6

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

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

How to Fix CVE-2026-34445

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-34445, 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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 ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. The problem? It didn’t check if the "keys" in the file were valid. Because it blindly trusted the file, an attacker could craft a malicious model that overwrites internal object properties. ### Why its Dangerous **Instant Crash DoS**: An attacker can set the length property to a massive number like 9 petabytes. When the system tries to load the model, it attempts to allocate all that RAM at once, causing the server to crash or freeze Out of Memory. **Access Bypass**: By setting a negative offset -1, an attacker can trick the system into reading parts of a file it wasn't supposed to touch. **Object Corruption**: Attackers can even inject "dunder" attributes like __class__ to change the object's type entirely, which could lead to more complex exploits. **Fixed**: https://github.com/onnx/onnx/pull/7751 object state corruption and DoS via ExternalDataInfo attribute injection

CVE-2026-34445 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-34445?
CVE-2026-34445 is a security vulnerability in ONNX involving Malicious ONNX models can crash servers by exploiting unprotected object settings. under CWE-400: Uncontrolled Resource Consumption.
Which ONNX versions are affected?
Affected versions include releases prior to 1.21.0 across affected packages: onnx.
What version fixes CVE-2026-34445?
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-34445?
CVE-2026-34445 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H.
What CWE is associated with CVE-2026-34445?
CVE-2026-34445 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2026-34445?
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-538c-55jv-c5g9",
  "modified" : "2026-04-01T21:10:52Z",
  "published" : "2026-04-01T21:10:52Z",
  "aliases" : [ "CVE-2026-34445" ],
  "summary" : "ONNX: Malicious ONNX models can crash servers by exploiting unprotected object settings.",
  "details" : "### Summary\nThe ExternalDataInfo class in ONNX was using Python’s setattr() function to load metadata (like file paths or data lengths) directly from an ONNX model file. The problem? It didn’t check if the \"keys\" in the file were valid. Because it blindly trusted the file, an attacker could craft a malicious model that overwrites internal object properties.\n\n### Why its Dangerous\n**Instant Crash DoS**: An attacker can set the length property to a massive number like 9 petabytes. When the system tries to load the model, it attempts to allocate all that RAM at once, causing the server to crash or freeze Out of Memory.\n\n**Access Bypass**: By setting a negative offset -1, an attacker can trick the system into reading parts of a file it wasn't supposed to touch.\n\n**Object Corruption**: Attackers can even inject \"dunder\" attributes like __class__ to change the object's type entirely, which could lead to more complex exploits.\n\n**Fixed**: https://github.com/onnx/onnx/pull/7751 object state corruption and DoS via ExternalDataInfo attribute injection",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H"
  } ],
  "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-538c-55jv-c5g9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34445"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/pull/7751"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/onnx/onnx/commit/e30c6935d67cc3eca2fa284e37248e7c0036c46b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/onnx/onnx"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-400", "CWE-915" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T21:10:52Z",
    "nvd_published_at" : "2026-04-01T18:16:30Z"
  }
}