DB-GPT Path Traversal vulnerability
The file deletion endpoint accepted a file path parameter without sanitising it, so an attacker could point it at any file on the server. If that file existed, the application would delete it.
dbgpt
Originally disclosed on huntr
A Path Traversal vulnerability exists in the eosphoros-ai/db-gpt version 0.6.0 at the API endpoint /v1/resource/file/delete. This vulnerability allows an attacker to delete any file on the server by manipulating the file_key parameter. The file_key parameter is not properly sanitized, enabling an attacker to specify arbitrary file paths. If the specified file exists, the application will delete it.
From the GitHub Advisory Database (GHSA-8pwp-phcg-h36g, CC BY 4.0).
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 file_key parameter was used to build a filesystem path for deletion without validating that it stayed inside the intended storage directory.
Impact
An attacker could delete arbitrary files on the server, which could break the application or destroy other users' data.
What the attacker needed
Access to the API 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 path traversal bug lets someone make a program reach files outside the folder it is meant to use, by putting folder-jumping characters or an absolute path into a value the program trusts. Here the value was a file name sent to a delete endpoint, and the server deleted whatever file the value pointed to. The result is that an attacker could wipe files the application needs or files belonging to other users.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.