CVE-2024-5187
Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.8
Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx
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.
- Record
CVE-2024-5187- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2024-1952
8.8
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.
- Record
EUVD-2024-1952- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-6rq9-53c3-f7vj
8.8
onnx 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, versions before 1.16.2, allow 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.
- Record
GHSA-6rq9-53c3-f7vj- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
8.8
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.
- Record
CVE-2024-5187- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVAZL-50635
8.8
CVE-2024-5187 affecting package pytorch for versions less than 2.2.2-3
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.
- Record
AZL-50635- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-05
OSV
8.8
Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx
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.
- Record
CVE-2024-5187- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
Show 6 moreShow less
OSVCVE-2025-51480
8.8
Path Traversal vulnerability in onnx.external_data_helper.save_external_data in ONNX 1.17.0 allows attackers to overwrite arbitrary files by supplying crafted external_data.location paths containing traversal sequences, bypassing intended directory restrictions.
- Record
CVE-2025-51480- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-5187
8.8
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.
- Record
DEBIAN-CVE-2024-5187- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-6rq9-53c3-f7vj
8.8
onnx 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, versions before 1.16.2, allow 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.
- Record
GHSA-6rq9-53c3-f7vj- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVPYSEC-2025-148
8.8
Path Traversal vulnerability in onnx.external_data_helper.save_external_data in ONNX 1.17.0 allows attackers to overwrite arbitrary files by supplying crafted external_data.location paths containing traversal sequences, bypassing intended directory restrictions.
- Record
PYSEC-2025-148- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-5187
8.8
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.
- Record
UBUNTU-CVE-2024-5187- CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUSN-8307-1 No score
onnx vulnerability
It was discovered that ONNX did not properly validate paths when extracting tar archives during model downloads. An attacker could possibly use this issue to overwrite arbitrary files on the system.
- Record
USN-8307-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
onnxPyPI |
before 1.16.2 | 1.16.2 |
pytorchAzure Linux:3 |
before 2.2.2-3 | 2.2.2-3 |
onnxDebian:13 |
before 1.16.2-1 | 1.16.2-1 |
onnxDebian:14 |
before 1.16.2-1 | 1.16.2-1 |
onnxPyPI From an advisory covering 2 CVEs |
before 1.16.2, plus listed versions 0.10.20.2.11.0.01.0.1 Show 27 moreShow less1.1.01.1.11.1.21.10.01.10.11.10.21.11.01.12.01.13.01.13.11.14.01.14.11.15.01.16.01.16.11.2.11.2.21.2.31.3.01.4.01.4.11.5.01.6.01.7.01.8.01.8.11.9.0 |
1.16.2 |
onnxPyPI From an advisory covering 2 CVEs |
through 1.17.0, plus listed versions 0.10.20.2.11.0.01.0.1 Show 28 moreShow less1.1.01.1.11.1.21.10.01.10.11.10.21.11.01.12.01.13.01.13.11.14.01.14.11.15.01.16.01.16.11.16.21.2.11.2.21.2.31.3.01.4.01.4.11.5.01.6.01.7.01.8.01.8.11.9.0 |
None known |
onnxUbuntu:Pro:24.04:LTS |
before 1.14.1-2.1ubuntu0.1~esm1, plus listed versions 1.13.1-31.13.1-3build11.14.1-21.14.1-2.11.14.1-2.1build11.14.1-2.1build2 |
1.14.1-2.1ubuntu0.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-5187 is a high vulnerability (CVSS 8.8) in Linuxfoundation Onnx, published June 6, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.17%, the 67th percentile. Fixed in onnx 1.16.2.
References
huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e
nvd.nist.gov/vuln/detail/CVE-2024-5187
github.com/onnx/onnx/issues/6215
github.com/onnx/onnx/pull/6145
github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f
github.com/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34
Show 15 moreShow less
github.com/onnx/onnx/pull/6222
github.com/onnx/onnx/releases/tag/v1.16.2
github.com/onnx/onnx/pull/6959
github.com/onnx/onnx/pull/7040
github.com/advisories/GHSA-6rq9-53c3-f7vj
github.com/onnx/onnx
github.com/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-148.yaml
gecko.security/blog/cve-2025-51480
github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5187.json
github.com/CVEProject/cvelistV5/tree/main/cves/2025/51xxx/CVE-2025-51480.json
nvd.nist.gov/vuln/detail/CVE-2025-51480
security-tracker.debian.org/tracker/CVE-2024-5187
ubuntu.com/security/CVE-2024-5187
cve.org/CVERecord?id=CVE-2024-5187
ubuntu.com/security/notices/USN-8307-1