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

Aim External Control of File Name or Path vulnerability

The aimhubio/aim application uses tarfile.extractall() without validating the extraction path, allowing an attacker to control repo.path and run_hash to write files to arbitrary locations on the server. This could overwrite critical files and enable further attacks such as adding an SSH key.

aim

Originally disclosed on huntr

Critical View original

A vulnerability in aimhubio/aim version 3.19.3 allows an attacker to exploit the tarfile.extractall() function to extract the contents of a maliciously crafted tarfile to arbitrary locations on the host server. The attacker can control repo.path and run_hash to bypass directory existence checks and extract files to unintended locations, potentially overwriting critical files. This can lead to arbitrary data being written to arbitrary locations on the remote tracking server, which could be used for further attacks such as writing a new SSH key to the target server.

From the GitHub Advisory Database (GHSA-75px-35p4-qq6h, 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 application passes user-controlled values (repo.path and run_hash) into tarfile.extractall() without validating or restricting the extraction path, allowing path traversal.

Impact

An attacker could write arbitrary data to arbitrary locations on the remote tracking server, potentially overwriting critical files and enabling further attacks such as writing a new SSH key.

What the attacker needed

Ability to supply a crafted tarfile; control over repo.path and run_hash

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 a program unpacks a tar archive, it should only write files inside a safe folder. Here, the program trusted the folder path and a hash value supplied by the user, so an attacker could make it write files anywhere on the server. That could let them replace important files or add their own login key.

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 aim

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.