CVE-2026-51883: Langchain-Chatchat: path traversal allows arbitrary file write

CRITICALPoC AVAILABLECISA: ATTEND
Published October 1, 2026
CISO Take

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.

Sources:NVDEPSSATLASGitHub (Langchain-Chatchat issue #5467)

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?

Initial Access
Attacker reaches an exposed Langchain-Chatchat 0.3.0/0.3.1 knowledge base creation or upload endpoint without authentication.
AML.T0049
Exploitation
Attacker injects path traversal sequences such as '..\' into knowledge_base_name so content is written outside the knowledge base root.
Persistence
Attacker overwrites or plants files such as configs, scripts or indexed documents that the application or host later loads.
Impact
Tampered files and poisoned knowledge content compromise the integrity of the host and RAG answers, and may expose stored data and credentials.

How severe is it?

CVSS 3.1
9.1 / 10
EPSS
0.4%
chance of exploitation in 30 days
Higher than 38% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
○CISA SSVC: Public PoC
○Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRNone
UINone
SUnchanged
CHigh
IHigh
ANone

What should I do?

1 step
  1. 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 does CISA's SSVC say?

DecisionAttend
Exploitationpoc
AutomatableYes
Technical Impacttotal

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:

EU AI Act
Art. 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Procedures to respond to and recover from unknown risks
OWASP LLM Top 10
LLM03-Supply Chain

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

RAG pipelinesLLM application frameworksSelf-hosted knowledge base chat applicationsDocument ingestion pipelines

MITRE ATLAS Techniques

AML.T0049Exploit Public-Facing Application
AML.T0070RAG Poisoning

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3
OWASP LLM Top 10: LLM03

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:N

Timeline

Published
October 1, 2026
Last Modified
October 5, 2026
First Seen
October 1, 2026

Related Vulnerabilities