Impact
The /knowledge_base/upload_temp_docs endpoint in Langchain Chatchat 0.3.1 does not properly sanitize the filename supplied by a client. This oversight enables an attacker to supply filenames that include traversal components such as '../', allowing the server to write the uploaded file to any location on the filesystem. An attacker can thus place executable code, modify configuration files, or overwrite critical data, effectively achieving remote code execution or data tampering. This reflects a Path Traversal weakness identified as CWE‑22.
Affected Systems
The affected product is Langchain Chatchat version 0.3.1. No other versions are explicitly listed in the data, so use of this version in any environment presents the same vulnerability. The vendor is not named in the CNA data, but the repository referenced in the advisory indicates the source code is hosted by the Chatchat‑space team.
Risk and Exploitability
The CVSS score of 9.8 and the EPSS score of < 1% indicate a high‑severity flaw with a low but non‑zero probability of exploitation. Despite not being listed in CISA’s KEV catalog, the potential for arbitrary file write remains significant. Attackers can reach the /knowledge_base/upload_temp_docs endpoint over the network, craft a malicious filename with traversal components, and then place any file, including executables, in any location on the server. This could lead to remote code execution, data tampering, or disruption of service.
OpenCVE Enrichment