CVE-2025-6855: Langchain-Chatchat: path traversal exposes system files
GHSA-f823-phmg-x5fr HIGH PoC AVAILABLE CISA: TRACK*Langchain-Chatchat deployments up to v0.3.1 expose a path traversal via the /v1/file API that any authenticated user can exploit to read or write arbitrary files on the host — with no patch available. If you run Chatchat in your enterprise RAG stack, isolate it from the internet immediately and restrict network access to trusted internal segments only. Audit who has credentials to the instance; low-privilege accounts are sufficient to exploit this.
What is the risk?
Risk is HIGH. CVSS 8.8 with network access, low complexity, and only low privileges required makes this trivially exploitable by any authenticated user — no specialist knowledge needed. The impact triad (C:H/I:H/A:H) indicates full compromise potential: read model configs, .env files containing API keys, write malicious files, or corrupt the knowledge base. No patch exists as of CVE publication date, leaving defenders with only compensating controls. Chatchat is widely deployed in enterprise on-premise RAG setups, increasing exposure surface.
What systems are affected?
How severe is it?
What is the attack surface?
What should I do?
7 steps-
IMMEDIATE
Block or disable the /v1/file API endpoint if not required for core operations — add a WAF rule or reverse proxy rule denying requests with path traversal patterns (../, %2e%2e, %252e%252e) in any parameter.
-
Network segmentation: ensure Chatchat is not internet-facing; restrict to internal VPN-only access.
-
Principle of least privilege: run the Chatchat process as a non-root user with a chroot or container boundary limiting filesystem access to only the document/knowledge base directory.
-
Rotate all API keys and credentials stored on hosts running Chatchat.
-
Review access logs for suspicious /v1/file requests with abnormal flag values.
-
Monitor the upstream repository (chatchat-space/Langchain-Chatchat) for a patched release and apply immediately when available.
-
Consider deploying a read-only filesystem mount for non-essential paths.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-6855?
Langchain-Chatchat deployments up to v0.3.1 expose a path traversal via the /v1/file API that any authenticated user can exploit to read or write arbitrary files on the host — with no patch available. If you run Chatchat in your enterprise RAG stack, isolate it from the internet immediately and restrict network access to trusted internal segments only. Audit who has credentials to the instance; low-privilege accounts are sufficient to exploit this.
Is CVE-2025-6855 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-6855, increasing the risk of exploitation.
How to fix CVE-2025-6855?
1. IMMEDIATE: Block or disable the /v1/file API endpoint if not required for core operations — add a WAF rule or reverse proxy rule denying requests with path traversal patterns (../, %2e%2e, %252e%252e) in any parameter. 2. Network segmentation: ensure Chatchat is not internet-facing; restrict to internal VPN-only access. 3. Principle of least privilege: run the Chatchat process as a non-root user with a chroot or container boundary limiting filesystem access to only the document/knowledge base directory. 4. Rotate all API keys and credentials stored on hosts running Chatchat. 5. Review access logs for suspicious /v1/file requests with abnormal flag values. 6. Monitor the upstream repository (chatchat-space/Langchain-Chatchat) for a patched release and apply immediately when available. 7. Consider deploying a read-only filesystem mount for non-essential paths.
What systems are affected by CVE-2025-6855?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, agent frameworks, local LLM serving, knowledge base Q&A systems.
What is the CVSS score for CVE-2025-6855?
CVE-2025-6855 has a CVSS v3.1 base score of 8.8 (HIGH). The EPSS exploitation probability is 0.55%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0025 Exfiltration via Cyber Means AML.T0037 Data from Local System AML.T0049 Exploit Public-Facing Application AML.T0055 Unsecured Credentials AML.T0085 Data from AI Services Compliance Controls Affected
What are the technical details?
Original Advisory
A vulnerability, which was classified as critical, has been found in chatchat-space Langchain-Chatchat up to 0.3.1. This issue affects some unknown processing of the file /v1/file. The manipulation of the argument flag leads to path traversal. The exploit has been disclosed to the public and may be used.
Exploitation Scenario
An adversary with a low-privilege Chatchat account (or a compromised internal user credential) sends a crafted GET or POST request to /v1/file with the flag parameter set to a traversal string such as ../../../../etc/passwd or ../../../../app/.env. Since Chatchat typically runs with broad filesystem permissions to serve its knowledge base documents, the traversal succeeds and returns sensitive file contents. The attacker extracts the .env file to obtain LLM API keys (OpenAI, Anthropic), then uses those keys externally to exfiltrate model access or incur costs. In a write scenario, the attacker overwrites a Python startup script or Chatchat configuration file to insert a reverse shell payload that executes when the service restarts. This entire chain requires only one authenticated API call per step — no AI/ML knowledge needed.
Weaknesses (CWE)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Primary
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
- github.com/chatchat-space/Langchain-Chatchat/issues/5354 Exploit Issue Vendor
- vuldb.com Permissions Required VDB
- vuldb.com 3rd Party VDB
- vuldb.com 3rd Party VDB
- github.com/advisories/GHSA-f823-phmg-x5fr
- nvd.nist.gov/vuln/detail/CVE-2025-6855
- github.com/PuddinCat/GithubRepoSpider Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
- github.com/plzheheplztrying/cve_monitor Exploit
Timeline
Related Vulnerabilities
CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same package: langchain CVE-2023-34541 9.8 LangChain: RCE via unsafe load_prompt deserialization
Same package: langchain CVE-2023-29374 9.8 LangChain: RCE via prompt injection in LLMMathChain
Same package: langchain CVE-2023-34540 9.8 LangChain: RCE via JiraAPIWrapper crafted input
Same package: langchain CVE-2023-36258 9.8 LangChain: unauthenticated RCE via code injection
Same package: langchain