CVE-2025-51480
JSON

8.8high

onnx allows Arbitrary File Overwrite in download_model_with_test_data

Severity
8.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.68% (higher than 53% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-6rq9-53c3-f7vjPYSEC-2025-148

Description

Path Traversal vulnerability in onnx.external_data_helper.save_external_data in ONNX 1.17.0 allows attackers to overwrite arbitrary files by supplying crafted external_data.location paths containing traversal sequences, bypassing intended directory restrictions.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
onnx (PyPI)before 1.16.2, up to 1.17.0GitHub Advisory Database, PyPA Advisory Database
linuxfoundation onnx1.17.0NVD

All scores

CISA-ADP8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
GitHub8.8high CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-22

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Path Traversal vulnerability in onnx.external_data_helper.save_external_data in ONNX 1.17.0 allows attackers to overwrite arbitrary files by supplying crafted external_data.location paths containing traversal sequences, bypassing intended directory restrictions.

GitHub Advisory Database

A vulnerability in the download_model_with_test_data function of the onnx/onnx framework, versions before 1.16.2, allow for arbitrary file overwrite due to inadequate prevention of path traversal attacks in malicious tar files. This vulnerability enables attackers to overwrite any file on the system, potentially leading to remote code execution, deletion of system, personal, or application files, thus impacting the integrity and availability of the system. The issue arises from the function's handling of tar file extraction without performing security checks on the paths within the tar file, as demonstrated by the ability to overwrite the /home/kali/.ssh/authorized_keys file by specifying an absolute path in the malicious tar file.

NVD (es)

La vulnerabilidad de Path Traversal en onnx.external_data_helper.save_external_data en ONNX 1.17.0 permite a los atacantes sobrescribir archivos arbitrarios al proporcionar rutas external_data.location creadas que contienen secuencias de recorrido, eludiendo las restricciones de directorio previstas.

References

https://github.com/onnx/onnxpackage, product
https://github.com/onnx/onnx/pull/6959exploit, fix, issue-tracking, patch, vendor-advisory, web
https://github.com/advisories/GHSA-6rq9-53c3-f7vjadvisory, not-applicable
https://github.com/onnx/onnx/pull/7040exploit, fix, issue-tracking, patch, vendor-advisory, web
https://www.gecko.security/blog/cve-2025-51480evidence, exploit, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2024-5187advisory
https://github.com/onnx/onnx/issues/6215web
https://github.com/onnx/onnx/pull/6145web
https://github.com/onnx/onnx/pull/6222web
https://github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552fweb
https://github.com/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34web
https://github.com/onnx/onnx/releases/tag/v1.16.2web

Related

Sources

SourceRecordLicence
CVE ListCVE-2025-51480 changed 2025-07-22CVE Terms of Use
GitHub Advisory DatabaseGHSA-6rq9-53c3-f7vj changed 2026-06-06CC-BY-4.0
NVDCVE-2025-51480 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-148 changed 2026-05-21CC-BY-4.0