CVE-2024-5278
JSON

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 packageVersionsReported by
gaizhenbiao gaizhenbiao/chuanhuchatgptfrom unspecified before 20240919CVE List
gaizhenbiao chuanhuchatgptall, before 20240919CVE List, NVD

All scores

@huntr_ai6.5medium CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-434

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

SourceRecordLicence
CVE ListCVE-2024-5278 changed 2025-10-15CVE Terms of Use
NVDCVE-2024-5278 changed 2026-06-17Public domain