{"id":"CVE-2024-5982","state":"PUBLISHED","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 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.","publishedAt":"2024-10-29T12:46:24.726Z","updatedAt":"2024-10-29T13:47:03.458Z","severity":{"score":9.1,"label":"Critical","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["gaizhenbiao gaizhenbiao/chuanhuchatgpt"],"affected":[{"vendor":"gaizhenbiao","product":"gaizhenbiao/chuanhuchatgpt","versions":[{"version":"unspecified","status":"affected","lessThan":"20240918","versionType":"custom"}]}],"references":["https://huntr.com/bounties/5d5c5356-e893-44d1-b5ca-642aa05d96bb","https://github.com/gaizhenbiao/chuanhuchatgpt/commit/952fc8c3cbacead858311747cddd4bedcb4721d7"],"weaknesses":["CWE-22"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/5xxx/CVE-2024-5982.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-5982","state":"PUBLISHED","datePublished":"2024-10-29T12:46:24.726Z","dateUpdated":"2024-10-29T13:47:03.458Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-06-13T18:09:56.490Z"},"containers":{"cna":{"title":"Path Traversal in gaizhenbiao/chuanhuchatgpt","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gaizhenbiao","product":"gaizhenbiao/chuanhuchatgpt","versions":[{"version":"unspecified","status":"affected","lessThan":"20240918","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/5d5c5356-e893-44d1-b5ca-642aa05d96bb"},{"url":"https://github.com/gaizhenbiao/chuanhuchatgpt/commit/952fc8c3cbacead858311747cddd4bedcb4721d7"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","baseScore":9.1,"baseSeverity":"CRITICAL"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","type":"CWE","lang":"en","description":"CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2024-10-29T12:46:24.726Z"},"source":{"advisory":"5d5c5356-e893-44d1-b5ca-642aa05d96bb","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"gaizhenbiao","product":"gaizhenbiao\\/chuanhuchatgpt","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"20240918","versionType":"custom"}],"cpes":["cpe:2.3:a:gaizhenbiao:gaizhenbiao\\/chuanhuchatgpt:*:*:*:*:*:*:*:*"]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":9.1,"attackVector":"NETWORK","baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-10-29T13:44:27.936584Z","id":"CVE-2024-5982","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-29T13:47:03.458Z"}}]}}}