Skip to content
Path traversal Disclosed report Beginner CVE-2024-4888

Arbitrary file deletion in litellm

The `/audio/transcriptions` endpoint in litellm deletes a file named by the request without validating the path. An attacker could delete arbitrary files on the server, such as SSH keys, databases, or configuration files.

BerriAI/litellm

Originally disclosed on huntr

BerriAI's litellm, in its latest version, is vulnerable to arbitrary file deletion due to improper input validation on the /audio/transcriptions endpoint. An attacker can exploit this vulnerability by sending a specially crafted request that includes a file path to the server, which then deletes the specified file without proper authorization or validation. This vulnerability is present in the code where os.remove(file.filename) is used to delete a file, allowing any user to delete critical files on the server such as SSH keys, SQLite databases, or configuration files.

From the GitHub Advisory Database (GHSA-3xr8-qfvj-9p9j, 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

The endpoint passes a user-controlled filename directly to a file deletion function without validating that it refers to an uploaded temporary file.

Impact

An attacker could delete critical files on the server, including SSH keys, SQLite databases, and configuration files.

What the attacker needed

Access to the /audio/transcriptions endpoint

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.

A web server has an endpoint that accepts audio files for transcription. Instead of only deleting its own temporary file, it deletes whatever file path the request supplies. This lets someone remove important files from the server.

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 BerriAI/litellm

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.