CVE-2024-5187Arbitrary 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.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | onnx | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | onnx | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | onnx | Fix pending | 1.14.1-2.1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-5187 |
| Ubuntu 22.04 | onnx | Not affected vulnerable_code_not_present | ||
| Debian 14 | onnx | Fixed | 1.16.2-1 | DEBIAN-CVE-2024-5187 |
| Debian 13 | onnx | Fixed | 1.16.2-1 | DEBIAN-CVE-2024-5187 |
| PyPI library | onnx | Fixed | 1.16.2 | PYSEC-2025-148 |
What the vendor says
As published in the CVE record by @huntr_ai, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- onnx/onnx: affected: unspecified to latest
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.