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

Source: https://junglewise.ai/threats/cve-2026-49114-onnx-save-external-data-symlink-following-file-write  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/onnx). Vendors: [PyPI](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/onnx/onnx/security/advisories/GHSA-q56x-g2fj-4rj6](https://github.com/onnx/onnx/security/advisories/GHSA-q56x-g2fj-4rj6)
- [https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-233-01.json](https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-233-01.json)

## Related threats

- [ONNX memory exhaustion in packed tensor unpacking](https://junglewise.ai/threats/cve-2026-115922-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX null pointer dereference in shape inference](https://junglewise.ai/threats/cve-2026-115921-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX ConvTranspose shape inference denial of service](https://junglewise.ai/threats/cve-2026-115920-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX out-of-bounds read in RNN shape inference](https://junglewise.ai/threats/cve-2026-115919-open-neural-network-exchange-onnx-is-an-open-standard-for)
- [ONNX TOCTOU race condition in save_external_data](https://junglewise.ai/threats/onnx-toctou-race-condition-in-save-external-data-b85422b8)
