Skip to main content

Langchain-Chatchat CVE-2026-51884

| EUVDEUVD-2026-91121 CRITICAL
Path Traversal (CWE-22)
2026-10-01 mitre GHSA-c869-r44m-5f4w
9.8
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed Chatchat API endpoint
  2. Delivery
    Craft upload with traversal filename
  3. Exploit
    Write file outside temp directory
  4. Execution
    Overwrite code/config for execution
  5. Impact
    Achieve server compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires network reachability to the Langchain-Chatchat 0.3.1 web/API server (default deployments expose the API, commonly on port 7861) and the ability to invoke the /knowledge_base/upload_temp_docs temporary document upload endpoint, which per the CVSS vector (PR:N) requires no authentication and no user interaction. The core prerequisite is simply that this upload endpoint is exposed and that the service process has write permissions to directories outside the intended temporary path. Limiting factors: impact is bounded by the filesystem privileges of the Chatchat service account, and escalation to code execution depends on being able to overwrite an executed/imported file; exposure is further limited if the instance is behind authentication, network segmentation, or not internet-facing.

Impact

Signals are mixed and must be weighed carefully. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N) describes a trivially-reachable, unauthenticated, low-complexity network flaw, and arbitrary file write on a Python application server (CWE-22) frequently escalates to remote code execution, which justifies the 9.8 rating. However, the EPSS score is very low (0.15%, 4th percentile), the CVE is NOT on the CISA KEV list, and there is no confirmed active exploitation - so despite the maximal CVSS, this is currently a high-severity-but-low-observed-exploitation issue rather than a mass-exploited emergency. The practical exposure is tempered by product prevalence: Langchain-Chatchat is a niche open-source RAG application, not ubiquitous enterprise software, which is consistent with the low EPSS. One caveat: the second reference is a GitHub gist (Ro1ME) that plausibly contains proof-of-concept exploitation details, but the input does not flag POC=YES, so exploit-code availability cannot be confirmed from the structured data alone and should be verified by reviewing that gist. Net assessment: a genuinely serious bug for any exposed Chatchat 0.3.1 instance, but real-world risk is bounded by limited deployment footprint and no evidence of widespread exploitation.

Exploit ScenarioDerived

An attacker who can reach a Langchain-Chatchat 0.3.1 server sends a crafted multipart request to the /knowledge_base/upload_temp_docs endpoint using a filename containing directory-traversal sequences (e.g. ../../). This writes attacker-controlled content outside the intended temporary directory, allowing overwrite of application code or configuration files and, on a Python server, likely leading to remote code execution. A proof-of-concept may exist in the referenced public gist, but POC availability is not confirmed in the structured input.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 05, 2026

Unauthenticated path traversal in Langchain-Chatchat 0.3.1 lets a remote attacker write files to arbitrary filesystem locations by submitting crafted filenames to the /knowledge_base/upload_temp_docs temporary document upload endpoint, escaping the intended temporary directory. The assessed vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, 9.8) confirms the endpoint is reachable over the network with no authentication and no user interaction required, and that a successful write can corrupt or replace application or system files, with potential escalation to code execution if an overwritten file is later imported or executed by the service. Independent risk signals are mixed: EPSS is low at 0.15% (4th percentile) and there is no CISA KEV listing, so no public exploit identified at time of analysis, but the associated GitHub issue and gist references document the endpoint's traversal behavior and raise the likelihood of straightforward replication by anyone with network access to a default deployment.

RemediationAI

No vendor-released patch identified at time of analysis - no fixed version is specified in the CVE record, EUVD entry, or the referenced GitHub issue/gist - so mitigation must be compensating until an upstream fix appears. The most effective immediate control is to remove the attack surface: block network access to the Chatchat API port (default 7861) at the firewall or reverse proxy, or disallow the /knowledge_base/upload_temp_docs route entirely; the trade-off is that temporary document upload functionality breaks, which may be acceptable if the knowledge-base ingestion workflow is not required. Place any remaining exposure behind an authenticating reverse proxy, since the assessed vector is PR:N (no authentication), and restrict access to trusted management networks only; this preserves functionality but adds a dependency on the proxy's correct configuration. Reduce the impact of a successful traversal by running the Chatchat service as a dedicated low-privilege account with write permission only to its own data directory, and by deploying it in a container with a read-only root filesystem and a writable, narrowly scoped temporary volume - this does not prevent the path traversal itself but prevents overwriting application code or system files and blocks escalation to code execution. Additionally, monitor for anomalous file creation outside the configured temp directory and for upload requests containing traversal sequences in filenames; track the vendor repository (https://github.com/chatchat-space/Langchain-Chatchat/issues/5466) and the NVD record (https://nvd.nist.gov/vuln/detail/CVE-2026-51884) for a patched release before re-enabling the endpoint.

Affected VersionsENISA

n/a n/a

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a classic CWE-22 improper limitation of a pathname to a restricted directory, manifesting in the Python-based Langchain-Chatchat application's document ingestion pipeline. The /knowledge_base/upload_temp_docs handler accepts multipart file uploads and derives the on-disk destination from the client-supplied filename without normalizing or rejecting traversal sequences (e.g. ../), so the write path is not confined to the configured temporary documents folder. Because the Chatchat web/API server typically runs as a single service account (commonly exposed on port 7861 in default deployments), the blast radius of the write primitive is bounded by that account's filesystem permissions but includes anything it can write - configuration files, knowledge-base content, static assets served by the app, and potentially Python modules that are later imported. The supplied CPE string is a placeholder (cpe:2.3:a:n/a:n/a) and the EUVD affected-version field is n/a, so product identification rests on the description and community references rather than structured CPE mapping; the primary corroborating artifacts are GitHub issue #5466 in the chatchat-space/Langchain-Chatchat repository and a public gist linked from the CVE record.

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

Vendor (mitre) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

Unauthenticated, low-complexity network endpoint (PR:N/AC:L) allows arbitrary file write enabling likely code execution, yielding full confidentiality, integrity, and availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Oct 05, 2026 - 19:22 NVD
9.8 (CRITICAL)
CVE Published
Oct 01, 2026 - 00:00 cve.org
UNKNOWN (no severity yet)
CVE Published
Oct 01, 2026 - 00:00 cve.org
CRITICAL 9.8

DescriptionCVE.org

The /knowledge_base/upload_temp_docs temporary document upload endpoint in Langchain Chatchat 0.3.1 is vulnerable to path traversal. By crafting malicious filenames, an attacker can write files to arbitrary locations on the server, bypassing the intended restrictions on the temporary directory.

Executive ViewAI

Why It Matters

Langchain-Chatchat 0.3.1, an open-source retrieval-augmented generation application, exposes a temporary document upload endpoint that lets any network-reachable, unauthenticated party write files to arbitrary locations on the host filesystem. Because a malicious write can overwrite application or system files - and potentially escalate to code execution if an overwritten file is subsequently imported or executed - any organization running this version with the endpoint exposed to untrusted networks faces risk of full compromise of the host and any data or credentials it can reach. Leadership should care because there is no vendor-released patch today, so containment depends entirely on network exposure reduction and compensating controls owned by our infrastructure and application teams.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: block or deny-list the /knowledge_base/upload_temp_docs endpoint at the reverse proxy, API gateway, or WAF and restrict it to trusted internal sources; place the service behind authenticated access (SSO/VPN) so it is not unauthenticated; run the process as a least-privilege user with a read-only root filesystem and a dedicated noexec/nosuid temp directory; add filename canonicalization and path-containment checks in front of the upload handler; enable file-integrity monitoring and alerting on unexpected file writes; isolate the instance on a segmented network with no access to sensitive data or credentials; and monitor upstream for a fixed release and upgrade as soon as one is available.

Threat Intelligence Overview

EPSS Score
0.2%
Top 96% exploitable
Prevalence
Low
niche open-source RAG application, limited production deployment footprint
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy