VDB

CVE-2024-5187

CVE-2024-5187 PUBLISHED CVSS 8.8 HIGH

Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

Reported by @huntr_ai · Published June 6, 2024

onnx is fixed in 1.16.2 (PyPI)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
onnxPyPI1.16.2
onnx/onnxonnxlatest

Risk scores

CVSS 3.0
8.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
onnxonnx/onnxunspecified
onnxonnx/onnx*
PyPIonnx0
linuxfoundationonnx1.16.0

Timeline

  • Jun 6, 2024 CVE Published
  • Jun 7, 2024 EPSS Score (30 in total, the first dated here)
  • Aug 1, 2024 CVE Updated
  • Oct 5, 2024 Coalition ESS Score (14 in total, the first dated here)
  • Mar 9, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-5187
vulnetix vdb fixes CVE-2024-5187

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-5187/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›