Skip to content
Heist/ feed
Back to feed
High

Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-5187, CVE-2025-51480
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 11:25 UTC · Revision 1

Source evidence

Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx

core-osv · Original source

Published 6 Jun 2024, 18:45 UTC

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.

osv:CVE-2024-5187
Complete source record
{
  "id": "efbce1801745a47eb76152fd03d0bf38e80885434fadb25d8e3078cdf0d14da6",
  "url": "https://osv.dev/vulnerability/CVE-2024-5187",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Arbitrary File Overwrite in download_model_with_test_data in onnx/onnx",
    "summary": "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.",
    "evidence": "osv:CVE-2024-5187",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-5187",
      "aliases": [
        "CVE-2024-5187",
        "CVE-2025-51480",
        "GHSA-6rq9-53c3-f7vj",
        "PYSEC-2025-148"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/onnx/onnx",
              "type": "GIT",
              "events": [
                {
                  "introduced": "990217f043af7222348ca8f0301e17fa7b841781"
                },
                {
                  "last_affected": "990217f043af7222348ca8f0301e17fa7b841781"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:linuxfoundation:onnx:1.16.0:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.16.0"
                      },
                      {
                        "last_affected": "1.16.0"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.16.0",
            "v1.16.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-5187.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.171089561Z",
      "provider": "osv",
      "references": [
        "https://huntr.com/bounties/50235ebd-3410-4ada-b064-1a648e11237e",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5187.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-5187"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22"
        ],
        "cna_assigner": "@huntr_ai",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5187.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-5187",
        "evidence": "/id"
      },
      {
        "value": "CVE-2025-51480",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494938,
  "published_at": "2024-06-06T18:45:19.456+00:00"
}