6.5medium
Unrestricted File Upload leading to RCE in gaizhenbiao/chuanhuchatgpt
- Severity
- 6.5medium CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 0.59% (higher than 49% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gaizhenbiao gaizhenbiao/chuanhuchatgpt | from unspecified before 20240919 | CVE List |
| gaizhenbiao chuanhuchatgpt | all, before 20240919 | CVE List, NVD |
All scores
| @huntr_ai | 6.5medium CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
gaizhenbiao/chuanhuchatgpt es afectado por una vulnerabilidad de carga de archivos sin restricciones debido a una validación insuficiente de los tipos de archivos cargados en su endpoint `/upload`. Específicamente, la función `handle_file_upload` no sanitiza ni valida la extensión del archivo o el tipo de contenido de los archivos cargados, lo que permite a los atacantes cargar archivos con extensiones arbitrarias, incluidos archivos HTML que contienen payloads XSS y archivos Python. Esta vulnerabilidad, presente en la última versión 20240310, podría provocar ataques XSS almacenados y potencialmente provocar la ejecución remota de código (RCE) en el servidor que aloja la aplicación.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-5278 changed 2025-10-15 | CVE Terms of Use |
| NVD | CVE-2024-5278 changed 2026-06-17 | Public domain |