CVE-2024-5982 Path Traversal in gaizhenbiao/chuanhuchatgpt
경로 gaizhenbiao/chuanhuchatgpt에서 횡단
설명
A path traversal vulnerability exists in the latest version of gaizhenbiao/chuanhuchatgpt. The vulnerability arises from unsanitized input handling in multiple features, including user upload, directory creation, and template loading. Specifically, the load_chat_history function in modules/models/base_model.py allows arbitrary file uploads, potentially leading to remote code execution (RCE). The get_history_names function in utils.py permits arbitrary directory creation. Additionally, the load_template function in utils.py can be exploited to leak the first column of CSV files. These issues stem from improper sanitization of user inputs concatenated with directory paths using os.path.join.
경로 횡단 취약점은 최신 버전의 gaizhenbiao / chuanhuchatgpt에 존재합니다. 이 취약점은 사용자 업로드, 디렉터리 생성 및 템플릿 로드를 포함한 여러 기능의 비위생 입력 처리에서 발생합니다. 특히 modules/models/base_model.py의 load_chat_history 함수는 임의의 파일 업로드를 허용하여 잠재적으로 원격 코드 실행(RCE)으로 이어질 수 있습니다. get_history_names 함수는 utils.py에서 임의 디렉토리 생성을 허용합니다. 또한 utils.py의 load_template 함수는 CSV 파일의 첫 번째 열이 누출되도록 악용 될 수 있습니다. 이러한 문제는 os.path.join을 사용하여 디렉토리 경로와 연결된 사용자 입력의 부적절한 초기화에서 비롯됩니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
gaizhenbiao
gaizhenbiao/chuanhuchatgpt
영향 받는 버전
- 20240918 미만
해결 버전
- 20240918 이상