The gaizhenbiao/chuanhuchatgpt application is vulnerable to a path traversal attack due to its use of an outdated gradio component. The application is designed to restrict user access to resources within the `web_assets` folder. However, the outdated version of gradio it employs is susceptible to path traversal, as identified in CVE-2023-51449. This vulnerability allows unauthorized users to bypass the intended restrictions and access sensitive files, such as `config.json`, which contains API keys. The issue affects the latest version of chuanhuchatgpt prior to the fixed version released on 20240305.
The application assumes that users have access only to resources located in the `web_assets` folder. However, the used version of the gradio library is vulnerable to path traversal (previously identified as CVE-2023-51449), which allows escaping that directory. An unauthenticated attacker can craft an appropriate HTTP request and gain access to any files on the server, for example the `config.json` file containing API keys.
An unauthenticated attacker can read sensitive application configuration files, including API keys, which may lead to account takeover, unauthorized use of AI services, and further security breach of the environment.
Update the ChuanhuChatGPT application to the version released after 2024-03-05, which includes the patch available in commit 6b8f7db347b390f6f8bd07ea2a4ef01a47382f00. It is also recommended to replace all API keys stored in the `config.json` file that may have been exposed.
All versions of the gaizhenbiao/ChuanhuChatGPT application preceding the patched version released on 2024-03-05
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HGaizhenbiao Chuanhuchatgpt
APPGaizhenbiao< 20240305
Related vulnerabilities
Path Traversal i RCE w ChuanhuChatGPT — niezabezpieczone dane wejściowe
Nadpisanie plików konfiguracyjnych w ChuanhuChatGPT (file overwrite)
Tworzenie arbitralnych folderów na serwerze w ChuanhuChatGPT
Nieautoryzowany restart serwera w ChuanhuChatGPT poprzez endpoint /queue/join
SSRF w interfejsie upload ChuanhuChatGPT — dostęp do zasobów wewnętrznych