DB-GPT Absolute Path Traversal vulnerability
The file upload endpoint in DB-GPT 0.6.0 allows user-controlled parameters to construct absolute paths, enabling an attacker to write files anywhere on the server. This could overwrite critical system files, such as SSH keys, for further exploitation.
dbgpt
Originally disclosed on huntr
In eosphoros-ai/db-gpt version 0.6.0, the endpoint for uploading files is vulnerable to absolute path traversal. This vulnerability allows an attacker to upload arbitrary files to arbitrary locations on the target server. The issue arises because the file_key and doc_file.filename parameters are user-controllable, enabling the construction of paths outside the intended directory. This can lead to overwriting essential system files, such as SSH keys, for further exploitation.
From the GitHub Advisory Database (GHSA-hhw5-29f6-hf4x, 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
Likely the application fails to validate or sanitise user-supplied path components, allowing absolute paths to be used directly in file write operations.
Impact
An attacker could overwrite essential system files, such as SSH keys, potentially leading to further compromise of the server.
What the attacker needed
Access to the file upload 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.
When you upload a file, the server usually saves it in a safe folder. Here, the server trusted the name and location given by the user, so someone could make it save a file anywhere, even over important system files. That could let them take over 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.