# CVE-2024-5187: Arbitrary File Overwrite in download\_model\_with\_test\_data in onnx/onnx

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2024-06-06 · Modified: 2024-08-01
- Aliases: GHSA-6rq9-53c3-f7vj, CVE-2025-51480, PYSEC-2025-148, UBUNTU-CVE-2024-5187, UBUNTU-CVE-2025-51480, USN-8307-1, DEBIAN-CVE-2024-5187
- Record: https://cvemate.com/vulnerability/CVE-2024-5187 · JSON: https://cvemate.com/vulnerability/CVE-2024-5187/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.0, CVE.org) CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 1.168%, percentile 68.434%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 3 (github, reference)

## Affected

- debian onnx (Debian): \< 1.16.2-1
- ubuntu onnx (Ubuntu): \< 1.14.1-2.1ubuntu0.1~esm1 \| All versions (No fix recorded)
- linuxfoundation onnx: 1.17.0 \| 1.16.0
- onnx onnx/onnx: ≥ unspecified, ≤ latest
- PyPI onnx (PyPI): \< 1.16.2 \| ≤ 1.17.0

## References (first 20 of 21)

- <https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5187>
- <https://github.com/onnx/onnx/issues/6215>
- <https://github.com/onnx/onnx/pull/6145>
- <https://github.com/onnx/onnx/pull/6222>
- <https://github.com/onnx/onnx/pull/6959>
- <https://github.com/onnx/onnx/pull/7040>
- <https://github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f>
- <https://github.com/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34>
- <https://github.com/advisories/GHSA-6rq9-53c3-f7vj>
- <https://github.com/onnx/onnx>
- <https://github.com/onnx/onnx/releases/tag/v1.16.2>
- <https://github.com/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-148.yaml>
- <https://www.gecko.security/blog/cve-2025-51480>
- <https://ubuntu.com/security/CVE-2024-5187>
- <https://www.cve.org/CVERecord?id=CVE-2024-5187>
- <https://ubuntu.com/security/notices/USN-8307-1>
- <https://ubuntu.com/security/CVE-2025-51480>
- <https://www.cve.org/CVERecord?id=CVE-2025-51480>
- <https://security-tracker.debian.org/tracker/CVE-2024-5187>

---

Data as of 2026-12-05T04:38:47.207Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
