CVE-2024-5982

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-5982
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-5982.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-5982
Published
2024-10-29T13:15:07.637Z
Modified
2025-11-16T11:49:23.438827Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
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 loadchathistory function in modules/models/basemodel.py allows arbitrary file uploads, potentially leading to remote code execution (RCE). The gethistorynames function in utils.py permits arbitrary directory creation. Additionally, the loadtemplate 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.

References

Affected packages

Git / github.com/gaizhenbiao/chuanhuchatgpt

Affected ranges

Type
GIT
Repo
https://github.com/gaizhenbiao/chuanhuchatgpt
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

Other

20230303
20230305
20230307
20230310
20230314
20230317
20230320
20230323
20230327
20230330
20230405
20230409
20230413
20230417
20230422
20230427
20230502
20230507
20230513
20230520
20230526
20230601
20230614
20230619
20230628
20230709
20230719
20230728
20230809
20230820
20230830
20230911
20230916
20230926
20231006
20231020
20231110
20231215
20231223
20240121
20240305
20240310
20240410
20240628
20240802
20240914