{"id":"CVE-2024-5982","summary":"Path Traversal in gaizhenbiao/chuanhuchatgpt","details":"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.","modified":"2026-08-12T03:51:10.772329928Z","published":"2024-10-29T12:46:24.726Z","database_specific":{"cwe_ids":["CWE-22"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5982.json","cna_assigner":"@huntr_ai"},"references":[{"type":"WEB","url":"https://huntr.com/bounties/5d5c5356-e893-44d1-b5ca-642aa05d96bb"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5982.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5982"},{"type":"FIX","url":"https://github.com/gaizhenbiao/chuanhuchatgpt/commit/952fc8c3cbacead858311747cddd4bedcb4721d7"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gaizhenbiao/chuanhuchatgpt","events":[{"introduced":"0"},{"fixed":"952fc8c3cbacead858311747cddd4bedcb4721d7"}],"database_specific":{"cpe":"cpe:2.3:a:gaizhenbiao:chuanhuchatgpt:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"20240918"}],"source":["AFFECTED_FIELD","CPE_RANGE","REFERENCES"]}}],"versions":["20240914","20240802","20240628","20240410","20240310","20240305","20240121","20231223","20231215","20231110","20231020","20231006","20230926","20230916","20230911","20230830","20230820","20230809","20230728","20230719","20230709","20230628","20230619","20230614","20230601","20230526","20230513","20230507","20230502","20230427","20230422","20230417","20230413","20230409","20230330","20230327","20230323","20230320","20230317","20230305","20230303"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-5982.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"}]}