# CVE-2024-5278: Unrestricted File Upload leading to RCE in gaizhenbiao/chuanhuchatgpt

- Severity: Medium 6.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-06T18:44:51.035Z
- Modified: 2026-06-17T08:15:36.010Z
- Weaknesses: CWE-434
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## Description

gaizhenbiao/chuanhuchatgpt is vulnerable to an unrestricted file upload vulnerability due to insufficient validation of uploaded file types in its `/upload` endpoint. Specifically, the `handle_file_upload` function does not sanitize or validate the file extension or content type of uploaded files, allowing attackers to upload files with arbitrary extensions, including HTML files containing XSS payloads and Python files. This vulnerability, present in the latest version as of 20240310, could lead to stored XSS attacks and potentially result in remote code execution (RCE) on the server hosting the application.

(As written by CVE List.)

## Affected

- gaizhenbiao gaizhenbiao/chuanhuchatgpt: from unspecified before 20240919
- gaizhenbiao chuanhuchatgpt: all; before 20240919

## Every score

- @huntr_ai: CVSS:3.0 6.5 Medium `CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/ea821d86-941b-40f3-a857-91f758848e05> (exploit, third-party-advisory)
- <https://github.com/gaizhenbiao/chuanhuchatgpt/commit/22007a77f037c0cf76180f9b73a8d19e87dad02e>

## Sources

- CVE List: [CVE-2024-5278](https://www.cve.org/CVERecord?id=CVE-2024-5278), CVE Terms of Use, modified 2025-10-15
- NVD: [CVE-2024-5278](https://nvd.nist.gov/vuln/detail/CVE-2024-5278), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-5278 · Whole record: https://cve.day/CVE-2024-5278.json · Rebuilt by cve.day 2026-11-25T22:58:41.523Z
