Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Chatchat instance
-
DeliveryCraft malicious file upload request
-
ExploitIntercept filename during validation-to-write window
-
ExecutionModify filename parameter via race condition
-
PersistOverwrite target file or redirect write path
-
ImpactIntegrity compromise
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
|
| Exploitation Conditions | Exploitation requires (1) authenticated access to the Langchain-Chatchat instance (PR:L), (2) network connectivity to the local network segment hosting the vulnerable server (AV:A - not internet-routable), (3) the OpenAI-Compatible File Upload API endpoint must be enabled and accessible to the attacker's user account, and (4) precise timing to execute the race condition between the file.filename validation check and file write operation (AC:H accounts for this complexity). The vulnerability does NOT require special non-default configuration or feature enablement - the API is part of the standard OpenAI compatibility layer. Exploitation is NOT possible from the internet unless the Langchain-Chatchat instance is exposed on a public network interface with authentication bypasses or weak credentials. |
| Impact | Despite the very low CVSS score of 1.2, this vulnerability carries moderate practical risk in specific deployments. The CVSS vector (AV:A/AC:H/PR:L/UI:N/VC:N/VI:L/VA:N) indicates attack surface is limited to local network attackers with prior authentication (PR:L), high complexity (AC:H), and minimal impact (integrity only, VC/VA/SA all None). However, EPSS data is absent, making exploitation probability assessment incomplete. The availability of public exploit code (E:P) and documented attack scenario elevate practical risk beyond the CVSS numeric score, suggesting real-world attacks are feasible despite high complexity. The integrity impact (VI:L) appears limited, but context-dependent: in file storage contexts, even minor integrity violations can escalate (e.g., silent file overwrite as noted in references). The lack of vendor response indicates no patch is forthcoming, increasing residual risk for deployed instances. Risk is NOT critical enterprise-wide but IS material for organizations running exposed Langchain-Chatchat instances on untrusted local networks or with hostile internal users. |
| Exploit ScenarioDerived | An authenticated attacker with access to the local network monitors the OpenAI-Compatible File Upload API endpoint. During the brief window between filename validation and actual file storage, the attacker races to modify the filename parameter (via a second request or network manipulation), causing the server to write the uploaded file to an unintended location or with a name that bypasses restrictions. The documented exploit demonstrates silent file overwrite capability, allowing an attacker to replace legitimate application or user files without detection. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Time-of-check time-of-use (TOCTOU) vulnerability in Langchain-Chatchat up to 0.3.1.3 allows authenticated local network attackers to manipulate file.filename arguments in the OpenAI-Compatible File Upload API, leading to integrity compromise through race condition exploitation. Publicly available exploit code exists, and the vendor has not responded to early disclosure notification despite proof-of-concept documentation.
RemediationAI
No vendor-released patch has been identified at time of analysis. The project maintainers have not responded to early disclosure despite issue notification. Immediate remediation options are limited: (1) Upgrade to a future patched version if released by chatchat-space (monitor GitHub releases and security advisories); (2) Implement network-level access controls restricting the OpenAI-Compatible File Upload API endpoint to trusted internal networks only, using firewall rules or API gateway authentication; (3) Disable the OpenAI-Compatible File Upload API feature entirely if not required for operations, reducing attack surface; (4) Implement file operation logging and integrity monitoring (checksums, audit trails) on uploaded files to detect race condition exploitation. Organizations should also consider submitting additional reports to the chatchat-space project or seeking community-maintained forks with security patches. None of these workarounds fully eliminate the TOCTOU race condition itself; they only reduce exposure or detectability.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in the OpenAI-Compatible File Upload API endpoint (libs/chatchat-server/chatchat/server/api_server/openai_routes.py) and stems from a classic TOCTOU race condition (CWE-367). The file upload handler checks the validity of file.filename at one point in time but uses that filename later without re-validating it, creating a window where an attacker on the local network can modify the filename between the check and use phases. This allows an authenticated user to bypass filename restrictions or manipulate file storage paths. The vulnerability requires local network access (AV:A) and high attack complexity (AC:H), limiting exposure to attackers within network proximity.
Know when Langchain Chatchat gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:A/AC:H/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
1DescriptionCVE.org
A vulnerability has been found in chatchat-space Langchain-Chatchat up to 0.3.1.3. Impacted is the function files of the file libs/chatchat-server/chatchat/server/api_server/openai_routes.py of the component OpenAI-Compatible File Upload API. Such manipulation of the argument file.filename leads to time-of-check time-of-use. Access to the local network is required for this attack to succeed. The attack requires a high level of complexity. The exploitability is considered difficult. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
More in Langchain Chatchat
View allUnauthenticated remote command execution in Langchain-Chatchat through version 0.3.1.3 allows any network-reachable atta
Unauthenticated path traversal in Langchain-Chatchat 0.3.1 lets a remote attacker write files to arbitrary filesystem lo
Unauthenticated path traversal in the OpenAI-compatible /v1/files upload endpoint of Langchain-Chatchat 0.3.0 allows rem
Path traversal in Langchain-Chatchat 0.3.0 and 0.3.1 allows unauthenticated remote attackers to write knowledge base con
Path traversal in Langchain-Chatchat's backend file upload endpoint allows remote attackers to manipulate file paths via
Path traversal in Langchain-Chatchat version 0.3.1 and earlier allows authenticated low-privilege users to read arbitrar
Missing authentication in Langchain-Chatchat up to version 0.3.1.3 allows unauthenticated local network attackers to acc
Path traversal vulnerability in Langchain-Chatchat up to 0.3.1 allows authenticated attackers with low privileges to rea
Insufficiently random file ID generation in Langchain-Chatchat up to version 0.3.1.3 allows authenticated local network
Weak hash function in the Vision Chat Paste Image Handler of Langchain-Chatchat up to 0.3.1.3 allows local network attac
EUVD-2026-27392
GHSA-x229-w2j4-h748
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB