CVE-2026-51883: Langchain-Chatchat: path traversal allows arbitrary file write
CRITICALPoC AVAILABLECISA: ATTENDLangchain-Chatchat 0.3.0 and 0.3.1 do not sanitize the knowledge_base_name parameter in the knowledge base creation and document upload interfaces. An unauthenticated remote attacker can use sequences such as ..\ to write content outside the configured knowledge base root. The CVSS is 9.1 (critical, network-reachable, no privileges, no user interaction). EPSS is low at 0.35% (top 74% percentile), the CVE is not in CISA KEV, and there is no public exploit or Nuclei template in our data, although the GitHub issue and a public gist describe the flaw. Arbitrary file write on an LLM application server can lead to overwritten configuration files, planted code or poisoned knowledge content, so exposed instances should be treated as high priority. Take any internet-facing deployment offline or put it behind authentication now, check the upstream issue #5467 for a fixed release, and review the filesystem for unexpected files outside the knowledge base directory.
What is the risk?
Rated critical by CVSS 9.1 (AV:N/AC:L/PR:N/UI:N). Exploitation is trivial and needs no authentication, which raises the risk for any instance reachable from the internet or a shared network. Current exploitation likelihood is low-to-moderate: EPSS 0.00349 (top 74%), not in KEV, no known public exploit or scanner template, although the technical write-up is public in a gist and the upstream issue. The impact is high for confidentiality and integrity and none for availability. In practice, arbitrary write can often be escalated to code execution if the attacker overwrites scripts, configs or startup files, but that depends on the deployment and is not confirmed in the advisory. Package risk data (dependents, Scorecard, patch cadence) is unavailable, so the blast radius is unknown. Self-hosted Chatchat deployments are common among Chinese-speaking communities and enterprise pilots.
How does the attack unfold?
How severe is it?
What is the attack surface?
What should I do?
1 step1) Check the upstream repo (chatchat-space/Langchain-Chatchat issue #5467) for a fixed release or patch and upgrade as soon as it is available; no fixed version is stated in the data we have. 2) Until patched, remove direct internet exposure: place the service behind a VPN, reverse proxy with authentication, or IP allowlist, and block the knowledge base creation and upload endpoints for untrusted users. 3) Add WAF or reverse-proxy rules that reject knowledge_base_name values containing '..', '/', '\', or URL-encoded variants. 4) Run the service as a low-privileged user in a container with a read-only filesystem except for the knowledge base directory, and avoid mounting sensitive host paths. 5) Detection: search web and application logs for requests to knowledge base creation and upload endpoints with traversal sequences, and audit the filesystem for files created or modified outside the configured knowledge base root since deployment. 6) Review the integrity of configuration files, scripts and knowledge base contents, and rotate any credentials stored on the host if tampering is suspected.
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-2026-51883?
Langchain-Chatchat 0.3.0 and 0.3.1 do not sanitize the knowledge_base_name parameter in the knowledge base creation and document upload interfaces. An unauthenticated remote attacker can use sequences such as ..\ to write content outside the configured knowledge base root. The CVSS is 9.1 (critical, network-reachable, no privileges, no user interaction). EPSS is low at 0.35% (top 74% percentile), the CVE is not in CISA KEV, and there is no public exploit or Nuclei template in our data, although the GitHub issue and a public gist describe the flaw. Arbitrary file write on an LLM application server can lead to overwritten configuration files, planted code or poisoned knowledge content, so exposed instances should be treated as high priority. Take any internet-facing deployment offline or put it behind authentication now, check the upstream issue #5467 for a fixed release, and review the filesystem for unexpected files outside the knowledge base directory.
Is CVE-2026-51883 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-51883, increasing the risk of exploitation.
How to fix CVE-2026-51883?
1) Check the upstream repo (chatchat-space/Langchain-Chatchat issue #5467) for a fixed release or patch and upgrade as soon as it is available; no fixed version is stated in the data we have. 2) Until patched, remove direct internet exposure: place the service behind a VPN, reverse proxy with authentication, or IP allowlist, and block the knowledge base creation and upload endpoints for untrusted users. 3) Add WAF or reverse-proxy rules that reject knowledge_base_name values containing '..', '/', '\', or URL-encoded variants. 4) Run the service as a low-privileged user in a container with a read-only filesystem except for the knowledge base directory, and avoid mounting sensitive host paths. 5) Detection: search web and application logs for requests to knowledge base creation and upload endpoints with traversal sequences, and audit the filesystem for files created or modified outside the configured knowledge base root since deployment. 6) Review the integrity of configuration files, scripts and knowledge base contents, and rotate any credentials stored on the host if tampering is suspected.
What systems are affected by CVE-2026-51883?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, LLM application frameworks, Self-hosted knowledge base chat applications, Document ingestion pipelines.
What is the CVSS score for CVE-2026-51883?
CVE-2026-51883 has a CVSS v3.1 base score of 9.1 (CRITICAL). The EPSS exploitation probability is 0.43%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0049Exploit Public-Facing ApplicationAML.T0070RAG PoisoningCompliance Controls Affected
What are the technical details?
Original Advisory
The knowledge base creation and document upload interfaces in Langchain-Chatchat 0.3.0;0.3.1 is vulnerable to path traversal. An attacker can inject path traversal sequences (such as `..\`) into the `knowledge_base_name` parameter to write knowledge base content to arbitrary locations outside the configured knowledge base root directory.
Exploitation Scenario
An attacker finds an internet-facing Langchain-Chatchat 0.3.1 instance used as an internal document assistant. They send a request to the knowledge base creation or document upload API with knowledge_base_name set to a value like '..\..\app\config' so the uploaded content is written outside the knowledge base root. They upload a crafted file that overwrites an application configuration or a script that the service loads, or drop files into a directory used by another service. They can also write poisoned documents into a path that is later indexed, so the RAG system serves attacker-controlled answers. Depending on host permissions this gives persistence or code execution, and the attacker then reaches model API keys and internal documents held by the host.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NReferences
Timeline
Related Vulnerabilities
CVE-2025-5952810.0Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Supply ChainCVE-2024-291210.0BentoML: RCE via insecure deserialization (CVSS 10)
Same attack type: Supply ChainCVE-2023-376510.0MLflow: path traversal allows arbitrary file read
Same attack type: Supply ChainCVE-2025-512010.0smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Supply ChainCVE-2026-2185810.0n8n: Input Validation flaw enables exploitation
Same attack type: Code Execution