{"id":"CVE-2024-5187","published":"2024-06-06T18:45:19Z","modified":"2024-08-01T21:03:10Z","title":"Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx","vendor":"onnx","product":"onnx/onnx","tier":"tail","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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01168,"percentile":0.68148,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e","tags":[]}],"priority":{"score":19.8,"factors":[{"name":"EPSS percentile","points":13.63},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"onnx","affectedVersions":[{"vendor":"onnx","product":"onnx/onnx","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-06-07T18:47:07.750405Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"onnx","vulnerableRanges":["<1.16.2","<=1.17.0"],"patched":["1.16.2"],"from":["GHSA-6rq9-53c3-f7vj","PYSEC-2025-148"],"provenance":"source"}],"summary":{"text":"The download_model_with_test_data function in the onnx/onnx framework fails to prevent path traversal when extracting tar archives, so files on the system can be overwritten via crafted paths inside a malicious tar file. An attacker who can get a user to fetch and process such an archive, requiring user interaction and no authentication, could overwrite arbitrary files, which could lead to code execution or deletion of data.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:15:20Z"},"euvd":{"id":"EUVD-2024-1952","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-onnx-onnx-cve-2024-5187","children":[{"from":"CVE-2024-5187","to":"CVE-2025-51480","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-6rq9-53c3-f7vj","via":"reference","url":"https://github.com/advisories/GHSA-6rq9-53c3-f7vj"}]}],"packageHistory":[{"cve":"CVE-2022-25882","published":"2023-01-25","fixed":"1.13.0","kev":false},{"cve":"CVE-2024-27318","published":"2024-02-23","fixed":"1.16.0","kev":false,"link":{"from":"CVE-2024-27318","to":"CVE-2024-5187","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:onnx","fromFixed":"1.16.0","toFixed":"1.16.2","daysApart":104}]}},{"cve":"CVE-2024-27319","published":"2024-02-23","fixed":"1.16.0","kev":false},{"cve":"CVE-2024-5187","published":"2024-06-06","fixed":"1.16.2","kev":false},{"cve":"CVE-2024-7776","published":"2025-03-20","fixed":"1.17.0","kev":false},{"cve":"CVE-2026-28500","published":"2026-03-18","fixed":"1.21.0rc1","kev":false},{"cve":"CVE-2026-27489","published":"2026-04-01","fixed":"1.21.0","kev":false}],"package":"PyPI:onnx"}}