{"id":"CVE-2024-5187","aliases":["AZL-50635","DEBIAN-CVE-2024-5187","EUVD-2024-1952","GHSA-6rq9-53c3-f7vj","PYSEC-2025-148","UBUNTU-CVE-2024-5187","USN-8307-1"],"status":"published","title":"Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx","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.","severity":{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01168,"percentile":0.67639,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2024-06-06T18:45:19Z","modified":"2026-11-05T05:40:51Z","fixes":[{"ecosystem":"PyPI","package":"onnx","fixed_in":["1.16.2"],"sources":["ghsa"]},{"ecosystem":"Azure Linux:3","package":"pytorch","fixed_in":["2.2.2-3"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"onnx","fixed_in":["1.16.2-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"onnx","fixed_in":["1.16.2-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:24.04:LTS","package":"onnx","fixed_in":["1.14.1-2.1ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.2"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"pytorch","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.2-3"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.2-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.2-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.16.2"}]}],"versions":["0.1","0.2","0.2.1","1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.10.0","1.10.1","1.10.2","1.11.0","1.12.0","1.13.0","1.13.1","1.14.0","1.14.1","1.15.0","1.16.0","1.16.1","1.2.1","1.2.2","1.2.3","1.3.0","1.4.0","1.4.1","1.5.0","1.6.0","1.7.0","1.8.0","1.8.1","1.9.0"],"bundled":2},{"source":"osv","ecosystem":"PyPI","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.17.0"}]}],"versions":["0.1","0.2","0.2.1","1.0.0","1.0.1","1.1.0","1.1.1","1.1.2","1.10.0","1.10.1","1.10.2","1.11.0","1.12.0","1.13.0","1.13.1","1.14.0","1.14.1","1.15.0","1.16.0","1.16.1","1.16.2","1.17.0","1.2.1","1.2.2","1.2.3","1.3.0","1.4.0","1.4.1","1.5.0","1.6.0","1.7.0","1.8.0","1.8.1","1.9.0"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.14.1-2.1ubuntu0.1~esm1"}]}],"versions":["1.13.1-3","1.13.1-3build1","1.14.1-2","1.14.1-2.1","1.14.1-2.1build1","1.14.1-2.1build2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"onnx","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.14.1-2.1ubuntu0.1~esm1"}]}],"versions":["1.13.1-3","1.13.1-3build1","1.14.1-2","1.14.1-2.1","1.14.1-2.1build1","1.14.1-2.1build2"]}],"products":[{"vendor":"linuxfoundation","product":"onnx"},{"vendor":"onnx","product":"onnx/onnx"}],"references":[{"url":"https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e","tags":["x_transferred","Exploit","Issue Tracking","Third Party Advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5187","tags":["web","advisory"]},{"url":"https://github.com/onnx/onnx/issues/6215","tags":["web"]},{"url":"https://github.com/onnx/onnx/pull/6145","tags":["web"]},{"url":"https://github.com/onnx/onnx/commit/1b70f9b673259360b6a2339c4bd97db9ea6e552f","tags":["web"]},{"url":"https://github.com/onnx/onnx/commit/3fc3845edb048df559aa2a839e39e95503a0ee34","tags":["web"]},{"url":"https://github.com/onnx/onnx/pull/6222","tags":["web"]},{"url":"https://github.com/onnx/onnx/releases/tag/v1.16.2","tags":["web"]},{"url":"https://github.com/onnx/onnx/pull/6959","tags":["fix","web"]},{"url":"https://github.com/onnx/onnx/pull/7040","tags":["fix","web"]},{"url":"https://github.com/advisories/GHSA-6rq9-53c3-f7vj","tags":["advisory"]},{"url":"https://github.com/onnx/onnx","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/onnx/PYSEC-2025-148.yaml","tags":["web"]},{"url":"https://www.gecko.security/blog/cve-2025-51480","tags":["article","web","evidence"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5187.json","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/51xxx/CVE-2025-51480.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-51480","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-5187","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-5187","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-5187","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-8307-1","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2024-5187","title":"Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx","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.","status":"published","published":"2024-06-06T18:45:19.456Z","modified":"2024-08-01T21:03:10.963Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:34:01.286506Z"}],"euvd":[{"id":"EUVD-2024-1952","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.","status":"published","published":"2024-06-06T18:45:19Z","modified":"2024-08-01T21:03:10Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-03T03:50:35.230694Z"}],"ghsa":[{"id":"GHSA-6rq9-53c3-f7vj","title":"onnx allows Arbitrary File Overwrite in download_model_with_test_data","description":"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.","status":"published","published":"2024-06-06T21:30:37Z","modified":"2026-06-06T14:42:36Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:40:18.682012Z"}],"nvd":[{"id":"CVE-2024-5187","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.","status":"published","published":"2024-06-06T19:16:06.1Z","modified":"2026-06-17T08:15:22.27Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:10:04.111836Z"}],"osv":[{"id":"AZL-50635","title":"CVE-2024-5187 affecting package pytorch for versions less than 2.2.2-3","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.","status":"published","published":"2024-06-06T19:16:06Z","modified":"2026-11-05T05:40:51Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-05T16:41:20.675084Z"},{"id":"CVE-2024-5187","title":"Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx","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.","status":"published","published":"2024-06-06T18:45:19.456Z","modified":"2026-10-28T02:30:28.171089561Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:44:44.032344Z"},{"id":"CVE-2025-51480","description":"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.","status":"published","published":"2025-07-22T00:00:00Z","modified":"2026-10-28T02:30:50.903289374Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:50.45326Z"},{"id":"DEBIAN-CVE-2024-5187","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.","status":"published","published":"2024-06-06T19:16:06.1Z","modified":"2026-11-02T12:03:08.030706354Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:44.117337Z"},{"id":"GHSA-6rq9-53c3-f7vj","title":"onnx allows Arbitrary File Overwrite in download_model_with_test_data","description":"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.","status":"published","published":"2024-06-06T21:30:37Z","modified":"2026-06-06T14:45:11.975695563Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"PYSEC-2025-148","description":"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.","status":"published","published":"2025-07-22T16:15:30.66Z","modified":"2026-05-21T15:00:22.504009793Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:54.242332Z"},{"id":"UBUNTU-CVE-2024-5187","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.","status":"published","published":"2024-06-06T19:16:00Z","modified":"2026-05-26T21:30:06.372344118Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:55:11.182485Z"},{"id":"USN-8307-1","title":"onnx vulnerability","description":"It was discovered that ONNX did not properly validate paths when extracting\ntar archives during model downloads. An attacker could possibly use this\nissue to overwrite arbitrary files on the system.","status":"published","published":"2026-05-26T17:51:44Z","modified":"2026-05-26T22:47:50.006969559Z","updated_at":"2026-11-02T16:58:25.103481Z"}]}}
