CVE-2026-49114: ONNX save_external_data symlink-following file write

CVE-2026-49114 · Severity: high · CVSS 7.1 · Published 2026-08-21

ONNX is a machine learning model format and runtime library used to serialize and load neural network models. The save_external_data function contains a symlink-following vulnerability that allows a local attacker with directory write access to redirect file writes to arbitrary locations (such as SSH keys or application config files), potentially leading to unauthorized access or system compromise.

Technologies: onnx (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-49114 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-49114 being exploited in the wild.
How severe is CVE-2026-49114?
High severity, with a CVSS score of 7.1, published 21 August 2026.
Which products and versions are affected?
onnx (PyPI) ECOSYSTEM:introduced=0,fixed=1.21.0.
Is there a fix for CVE-2026-49114?
Yes. onnx (PyPI): upgrade to 1.21.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-49114 attacked?
It is attacked with local access.
Am I affected by CVE-2026-49114?
Check whether you run onnx (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • onnx (PyPI): upgrade to 1.21.0 or later
    pip install "onnx>=1.21.0"

Technical details

A TOCTOU (time-of-check time-of-use) race condition exists in the save_external_data method in external_data_helper.py. The function checks if an external data file exists using os.path.isfile() and then opens it for writing without the O_NOFOLLOW or O_EXCL flags. An attacker with write access to the target directory can plant a symlink between the check and the open call, causing the victim's write to follow the symlink and overwrite any file the victim has write permissions to (e.g., ~/.ssh/authorized_keys, cron files, or application configs). The vulnerability requires local access and user interaction (loading and saving a model), but enables arbitrary file write as the victim user. Fixed in version 1.21.0.

Affected products

  • ONNX ONNX before 1.21.0

Identifiers

  • CVE-2026-49114
  • GHSA-q56x-g2fj-4rj6
  • PYSEC-2026-3876

Timeline

  • 2026-08-21: disclosed
  • 2026-08-21: patched: Version 1.21.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.