{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-5982","id":"CVE-2024-5982","title":"Path Traversal in gaizhenbiao/chuanhuchatgpt","description":"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 g","descriptionLong":"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.","published":"2024-10-29T12:46:24.726Z","updated":"2026-10-28T02:30:34.053314082Z","reserved":"2024-06-13T18:09:56.490Z","status":"Analyzed","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","rating":"critical","source":"CISA-ADP"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.0","score":9.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","rating":"critical","source":"@huntr_ai"},{"version":"3.0","score":9.1,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","rating":"critical","source":"huntr.dev"}],"rating":"critical","products":["gaizhenbiao/chuanhuchatgpt"],"affectedProducts":[{"vendor":"gaizhenbiao","product":"gaizhenbiao/chuanhuchatgpt","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"20240918","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[],"cwes":["CWE-22"],"aliases":[],"references":[{"url":"https://huntr.com/bounties/5d5c5356-e893-44d1-b5ca-642aa05d96bb","tags":["Exploit","web"]},{"url":"https://github.com/gaizhenbiao/chuanhuchatgpt/commit/952fc8c3cbacead858311747cddd4bedcb4721d7","tags":["Patch","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5982.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5982","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.31081,"epssPercentile":0.98298,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-5982","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-5982","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-5982","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-5982","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":["EPSS 31% with CVSS 9.8"],"attention":null}