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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | onnx | 1.16.2-1 | DEBIAN-CVE-2024-5187 |
| Debian:14 | onnx | 1.16.2-1 | DEBIAN-CVE-2024-5187 |
| PyPI | onnx | 1.16.2 | GHSA-6rq9-53c3-f7vj |
| PyPI | onnx | no fix listed | PYSEC-2025-148 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H