Vulnerability · Published Jun 6, 2024 · Assigned by @huntr_ai

CVE-2024-5187Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

High 8.8

In plain English

A high-severity path traversal in onnx/onnx from onnx. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 68% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)8.8High
Exploit odds (30 days)1.2%top 32.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13onnx1.16.2-1DEBIAN-CVE-2024-5187
Debian:14onnx1.16.2-1DEBIAN-CVE-2024-5187
PyPIonnx1.16.2GHSA-6rq9-53c3-f7vj
PyPIonnxno fix listedPYSEC-2025-148

Affected products (as reported)

VendorProductVersions
onnx onnx/onnx unspecified – through latest

Weakness: CWE-22 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References