Skip to content
Path traversal Disclosed report Intermediate CVE-2024-7776

Open Neural Network Exchange (ONNX) Path Traversal Vulnerability

The download_model function in ONNX versions up to 1.16.1 does not properly prevent path traversal when extracting malicious tar files, allowing an attacker to overwrite arbitrary files in the user's directory. This could potentially lead to remote command execution.

onnx/onnx

Originally disclosed on huntr

A vulnerability in the download_model function of the onnx/onnx framework, before and including version 1.16.1, allows for arbitrary file overwrite due to inadequate prevention of path traversal attacks in malicious tar files. This vulnerability can be exploited by an attacker to overwrite files in the user's directory, potentially leading to remote command execution.

From the GitHub Advisory Database (GHSA-h36j-8vv3-cj52, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the tar extraction logic did not validate or sanitise file paths, allowing entries with '../' to escape the intended directory.

Impact

An attacker could overwrite files in the user's directory, potentially leading to remote command execution.

What the attacker needed

User downloads a malicious model; user extracts the tar file

The fix

The vulnerability was fixed in a later version by properly validating paths during tar extraction.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you download a model, the software unpacks a compressed file (a tar file). If that file contains special paths like '../', it can write files outside the intended folder. Here, the software failed to block such paths, so a malicious model file could overwrite important files on your computer, which might let an attacker run their own commands.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from onnx/onnx

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.