CVEfocus › CVE database › CVE-2024-5187

CVE-2024-5187Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

CVSS 8.8 HighEPSS 1.8% (higher than 79% of CVEs)Published 2024-06-06Updated 2024-08-01Assigner: @huntr_ai

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.

CWE-22

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

3Fixed
1Fix pending
3Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04onnxNot affected
vulnerable_code_not_present
Ubuntu 25.10onnxNot affected
vulnerable_code_not_present
Ubuntu 24.04onnxFix pending1.14.1-2.1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-5187
Ubuntu 22.04onnxNot affected
vulnerable_code_not_present
Debian 14onnxFixed1.16.2-1DEBIAN-CVE-2024-5187
Debian 13onnxFixed1.16.2-1DEBIAN-CVE-2024-5187
PyPI libraryonnxFixed1.16.2PYSEC-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.

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.