CVE-2024-5187 json
Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx
published 2024-06-06 2 y ago modified 2026-06-17 4 mo ago also CVE-2025-51480 , GHSA-6rq9-53c3-f7vj , PYSEC-2025-148 , EUVD-2024-1952
- cvss
- 8.8
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 67%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi onnx 1.16.2
- onnx Debian 14, Debian 13 1.16.2-1
debian advisories DEBIAN-CVE-2024-5187
- onnx Ubuntu Pro 24.04 LTS 1.14.1-2.1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2024-5187
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/onnx/onnx@1b70f9b commit
- github.com/onnx/onnx@3fc3845 commit
- github.com/onnx/onnx#6145 pull request
- github.com/onnx/onnx#6222 pull request
- github.com/onnx/onnx#6959 pull request
- github.com/onnx/onnx#7040 pull request
- github.com/onnx/onnx/releases/tag/v1.16.2 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-5187 updated cvss 8.8
onnx: arbitrary file overwrite in download_model_with_test_data
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
1.17% chance of exploitation in the next 30 days, higher than 67% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.com https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 3.0 | 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | onnx | <1.16.2 <=1.17.0 |
1.16.2 |
Affected products
- onnx onnx/onnx
- linuxfoundation onnx
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/onnx/onnx/pull/6145
web
-
github.com
/onnx/onnx/pull/6222
web
-
github.com
/onnx/onnx/pull/6959
web, patch
-
github.com
/onnx/onnx/pull/7040
web, patch
-
github.com
/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f
web
-
github.com
/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34
web
-
huntr.com
/bounties/50235ebd-3410-4ada-b064-1a648e11237e
web, exploit, issue-tracking, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-5187
advisory
-
github.com
/onnx/onnx/issues/6215
web
-
github.com
/advisories/GHSA-6rq9-53c3-f7vj
advisory
-
github.com
/onnx/onnx
package
-
github.com
/onnx/onnx/releases/tag/v1.16.2
web
-
github.com
/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-148.yaml
web
-
gecko.security
/blog/cve-2025-51480
web, evidence
Sources
- CVE List CVE-2024-5187
- GitHub Advisory GHSA-6rq9-53c3-f7vj
- NVD CVE-2024-5187
- OSV PYSEC-2025-148
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.