CVE-2025-6854: Langchain-Chatchat: path traversal in file API exposes host FS
GHSA-8v8h-4pjx-rg73 MEDIUM PoC AVAILABLE CISA: TRACK*Any authenticated user can traverse the file system via the /v1/files?purpose=assistants endpoint, potentially reading API keys, model configs, system prompts, and sensitive data stored on the host. No patch exists as of publication — restrict access immediately via network controls or WAF rules and treat any exposed instance as compromised until audited. Low exploitation complexity with a public PoC makes this an active risk despite the medium CVSS.
Risk Assessment
CVSS 4.3 understates the real-world risk in AI deployments. Low privileges required (any registered user) combined with low complexity and a public exploit significantly raise exploitability. The true impact depends on what sensitive assets are reachable on the host filesystem — LLM framework deployments commonly co-locate API keys, vector database credentials, RAG document stores, and system prompts in predictable paths. EPSS of 0.00147 reflects low mass-exploitation activity but not the risk to targeted organizations. No patch available amplifies urgency.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| langchain-chatchat | pip | — | No patch |
| langchain-chatchat | pip | <= 0.3.1 | No patch |
Severity & Risk
Attack Surface
Recommended Action
7 steps-
IMMEDIATE
Block or restrict access to /v1/files?purpose=assistants via WAF or reverse proxy for untrusted users.
-
Network-level: Place Langchain-Chatchat behind VPN or internal network — do not expose to public internet.
-
Audit: Review web server access logs for path traversal patterns (../, %2e%2e, %252e) in the files endpoint.
-
Principle of least privilege: Run the application process under a dedicated low-privilege user with minimal filesystem access.
-
Secrets: Rotate any API keys or credentials stored on the host.
-
Monitor: Set up file access monitoring (auditd/inotify) on sensitive directories.
-
Patch: Track https://github.com/chatchat-space/Langchain-Chatchat/issues/5353 for official fix — no patched version exists as of 2025-06-29.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-6854?
Any authenticated user can traverse the file system via the /v1/files?purpose=assistants endpoint, potentially reading API keys, model configs, system prompts, and sensitive data stored on the host. No patch exists as of publication — restrict access immediately via network controls or WAF rules and treat any exposed instance as compromised until audited. Low exploitation complexity with a public PoC makes this an active risk despite the medium CVSS.
Is CVE-2025-6854 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-6854, increasing the risk of exploitation.
How to fix CVE-2025-6854?
1. IMMEDIATE: Block or restrict access to /v1/files?purpose=assistants via WAF or reverse proxy for untrusted users. 2. Network-level: Place Langchain-Chatchat behind VPN or internal network — do not expose to public internet. 3. Audit: Review web server access logs for path traversal patterns (../, %2e%2e, %252e) in the files endpoint. 4. Principle of least privilege: Run the application process under a dedicated low-privilege user with minimal filesystem access. 5. Secrets: Rotate any API keys or credentials stored on the host. 6. Monitor: Set up file access monitoring (auditd/inotify) on sensitive directories. 7. Patch: Track https://github.com/chatchat-space/Langchain-Chatchat/issues/5353 for official fix — no patched version exists as of 2025-06-29.
What systems are affected by CVE-2025-6854?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, agent frameworks, LLM application servers, knowledge base systems.
What is the CVSS score for CVE-2025-6854?
CVE-2025-6854 has a CVSS v3.1 base score of 4.3 (MEDIUM). The EPSS exploitation probability is 0.50%.
Technical Details
NVD Description
A vulnerability classified as problematic was found in chatchat-space Langchain-Chatchat up to 0.3.1. This vulnerability affects unknown code of the file /v1/files?purpose=assistants. The manipulation leads to path traversal. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used.
Exploitation Scenario
An attacker registers an account on an internet-exposed Langchain-Chatchat instance (or compromises a low-privilege account). They send a crafted GET request to /v1/files?purpose=assistants with path traversal sequences (e.g., ../../etc/passwd or ../../app/.env) to enumerate and exfiltrate files. Primary targets include .env files containing OpenAI/Anthropic API keys, LangChain config files with vector DB credentials, knowledge base documents containing proprietary business data, and system prompt files revealing AI behavior configurations. With API keys in hand, the attacker pivots to directly abuse LLM API quotas or exfiltrate RAG-indexed proprietary documents.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N References
- github.com/chatchat-space/Langchain-Chatchat/issues/5353 Exploit Issue Vendor
- vuldb.com Permissions Required VDB
- vuldb.com 3rd Party VDB
- vuldb.com 3rd Party VDB
- github.com/advisories/GHSA-8v8h-4pjx-rg73
- nvd.nist.gov/vuln/detail/CVE-2025-6854
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
AI Threat Alert