---
id: CVE-2026-49114
title: >-
  In ONNX before 1.21.0, the 'save_external_data' function builds the
  external-data file path from the model's external_data location field and
  opens it for writing without 'O_NOFOLLOW/O_EXCL', after a non-atomic
  'os.path.isfile()' check
summary: >-
  In ONNX before 1.21.0, the 'save_external_data' function builds the
  external-data file path from the model's external_data location field and
  opens it for writing without 'O_NOFOLLOW/O_EXCL', after a non-atomic
  'os.path.isfile()' check. …
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H'
cwe:
  - CWE-22
  - CWE-59
  - CWE-367
vendor: linuxfoundation
product: onnx
affected:
  - onnx < 1.21.0
patched:
  - onnx 1.21.0
published: '2026-08-21'
updated: '2026-09-16'
sourceUpdated: '2026-09-16T13:55:10.540'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-49114'
references:
  - url: 'https://github.com/onnx/onnx/security/advisories/GHSA-q56x-g2fj-4rj6'
    label: 9119a7d8-5eab-497f-8521-727c672e3725
  - url: >-
      https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-233-01.json
    label: 9119a7d8-5eab-497f-8521-727c672e3725
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-49114'
    label: 9119a7d8-5eab-497f-8521-727c672e3725
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-49114'
  - url: 'https://github.com/onnx/onnx'
  - url: 'https://pypi.org/project/onnx'
  - url: 'https://github.com/advisories/GHSA-q56x-g2fj-4rj6'
tags:
  - nvd
  - osv
  - pip
  - ghsa
epss: 0.00159
epssPercentile: 0.04318
aliases:
  - GHSA-q56x-g2fj-4rj6
  - PYSEC-2026-3876
ecosystem: pip
ingestedAt: '2026-08-22T19:24:27.429Z'
---

## Overview

In ONNX before 1.21.0, the 'save_external_data' function builds the external-data file path from the model's external_data location field and opens it for writing without 'O_NOFOLLOW/O_EXCL', after a non-atomic 'os.path.isfile()' check. A local attacker with write access to the directory where a victim serializes external data can deterministically pre-plant a symlink that is being followed, causing the victim's write to append to any file the victim can write, e.g. ~/.ssh/authorized_keys, cron files, or application configs. Fixed in 1.21.0.

## Affected

- `onnx < 1.21.0`

## Remediation

Upgrade past the affected range:

- `onnx 1.21.0`

## Package advisory (CVE-2026-49114)

Affected packages:

- `onnx < 1.21.0`

Patched in:

- `onnx 1.21.0`

Source: https://osv.dev/vulnerability/GHSA-q56x-g2fj-4rj6
