High

ONNX: Malicious ONNX models can crash servers by exploiting unprotected object settings.

  • Disclosed: 01.04.2026
  • Updated: 11.10.2026 15:17

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

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 8.6/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Weakness (CWE)
CWE-20, CWE-400, CWE-915
Platform
Python (PyPI)
Package
onnx
Disclosed
01.04.2026
Updated
11.10.2026 15:17

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2240 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-538c-55jv-c5g9 - 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: Malicious ONNX models can crash servers by exploiting unprotected object settings. this entry
    High · 8.6 CVE-2026-34445 < 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.