eosphoros-ai/db-gpt version 0.6.0 is vulnerable to an arbitrary file write through the knowledge API. The endpoint for uploading files as 'knowledge' is susceptible to absolute path traversal, allowing attackers to write files to arbitrary locations on the target server. This vulnerability arises because the 'doc_file.filename' parameter is user-controllable, enabling the construction of absolute paths.
The API endpoint for uploading files as 'knowledge' does not properly validate the 'doc_file.filename' parameter, which is fully controlled by the user. An attacker can provide an absolute path as the filename, resulting in the uploaded file being written to any location on the server's file system. The vulnerability is classified as absolute path traversal (CWE-36) — the system accepts absolute paths instead of restricting writes to a designated directory.
An unauthenticated attacker can overwrite arbitrary files on the server or place malicious files in critical system locations, which can lead to server takeover (e.g., by overwriting configuration, startup scripts, or executable files) and permanent compromise of system integrity.
Apply patches available from the vendor according to references. Additionally, it is recommended to restrict network access to knowledge API endpoints exclusively to trusted users and implement server-side validation of uploaded file names (rejecting absolute paths and path traversal sequences).
eosphoros-ai/DB-GPT version 0.6.0
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:HDbgpt Db Gpt
APPDbgpt0.6.0
Related vulnerabilities
Dowolne wykonanie kodu przez niekontrolowane SQL API w db-gpt
Absolute Path Traversal w DB-GPT — zapis plików w dowolnej lokalizacji
Dowolny zapis plików w db-gpt przez podatność path traversal w RAG-knowledge
SQL Injection i zapis plików w db-gpt umożliwiające RCE
Arbitrary File Upload z Path Traversal w db-gpt — możliwy RCE