CVE-2024-5187
HIGH 8.8CVSS 3.1onnx allows Arbitrary File Overwrite in download_model_with_test_data
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.
- Published
- 6 Jun 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security@huntr.dev
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- CVE-2025-51480GHSA-6rq9-53c3-f7vjPYSEC-2025-148
- Sources
- NVDJSONOSV GHSA-6rq9-53c3-f7vjJSONOSV PYSEC-2025-148JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linuxfoundation | onnxcpe:2.3:a:linuxfoundation:onnx:1.16.0:*:*:*:*:*:*:* |
= 1.16.0 | |
| OSV | PyPI | onnx | < 1.16.2 | 1.16.2 |
| OSV | PyPI | onnx | <= 1.17.0 |
References
- https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e · Exploit, Issue Tracking, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-5187 · ADVISORY
- https://github.com/onnx/onnx/issues/6215 · WEB
- https://github.com/onnx/onnx/pull/6145 · WEB
- https://github.com/onnx/onnx/pull/6222 · WEB
- https://github.com/onnx/onnx/pull/6959 · WEB, FIX
- https://github.com/onnx/onnx/pull/7040 · WEB, FIX
- https://github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f · WEB
- https://github.com/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34 · WEB
- https://github.com/advisories/GHSA-6rq9-53c3-f7vj · ADVISORY
- https://github.com/onnx/onnx · PACKAGE
- https://github.com/onnx/onnx/releases/tag/v1.16.2 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-148.yaml · WEB
- https://www.gecko.security/blog/cve-2025-51480 · WEB, EVIDENCE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 6 Jun 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 22 Jul 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Jun 2024)