Skip to content
OpenAdvisories
High · 8.8 CVE-2024-5187 CVE-2025-51480EUVD-2024-1952GHSA-6rq9-53c3-f7vj

Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

Published Jun 6, 2024 · Updated Aug 1, 2024 · Assigned by @huntr_ai

Description

A vulnerability in the `download_model_with_test_data` function of the onnx/onnx framework, version 1.16.0, allows 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.

Affected products

VendorProductAffectedFixed
onnx onnx/onnx unspecified – ≤ latest —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 onnx 1.16.2-1 —
Debian 13 onnx 1.16.2-1 —
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS onnx 1.14.1-2.1ubuntu0.1~esm1 USN-8307-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 pytorch 2.2.2-3 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI onnx < 1.16.2 1.16.2 GHSA-6rq9-53c3-f7vj
PyPI onnx <= 1.17.0 — PYSEC-2025-148

Advisories 1

References