Cyber Resilience

CVE-2024-5982

CriticalPublic PoC

Published: 29 October 2024

Published
29 October 2024
Modified
14 November 2024
KEV Added
Patch
CVSS Score v3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0869 92.7th percentile
Risk Priority 25 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2024-5982 is a critical-severity Path Traversal (CWE-22) vulnerability in Gaizhenbiao Chuanhuchatgpt. Its CVSS base score is 9.8 (Critical).

Operationally, ranked in the top 7.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

Deeper analysis

A path traversal vulnerability tracked as CVE-2024-5982 affects the latest version of the gaizhenbiao/chuanhuchatgpt project. The flaw stems from missing sanitization of user-supplied input that is concatenated into filesystem paths via os.path.join calls. Affected code paths include the load_chat_history function in modules/models/base_model.py, which permits arbitrary file uploads, the get_history_names function in utils.py, which allows arbitrary directory creation, and the load_template function in utils.py, which can leak the first column of CSV files. The issue is classified under CWE-22 and carries a CVSS 3.1 score of 9.8.

Unauthenticated remote attackers can exploit the vulnerability over the network without user interaction to upload arbitrary files, create directories outside intended locations, and read sensitive CSV data. Successful abuse of the file-upload path can lead to remote code execution on the server hosting the application.

A fix is available in commit 952fc8c3cbacead858311747cddd4bedcb4721d7 on the upstream repository. The associated huntr.com bounty report provides additional technical details on the affected functions and the path-traversal vectors.

EPSS for the CVE rose from lower values after disclosure to a peak of 0.1688 on 2025-12-11 before receding to the current score of 0.0869, indicating a period of increased exploitation interest following public release.

EU & UK References

Vulnerability 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…

more

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.

CWE(s)

Related Threats

No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.

Affected Assets

gaizhenbiao
chuanhuchatgpt
≤ 20240918

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-22

Validates pathnames and filenames to prevent traversal outside intended directories.

References