IT SBIT Services
Schneeberger
DEEN
CVE tracker

Langchain-Chatchat: Path traversal in temporary document upload

CVE-2026-51884Critical 9.8

← All vulnerabilities

Summary

Langchain-Chatchat 0.3.1 contains a path traversal flaw in the /knowledge_base/upload_temp_docs endpoint. Because user-supplied filenames are not sanitized before being combined with the storage directory, a remote attacker can write files to arbitrary locations on the server. The reporter describes an unauthenticated attack over HTTP; the NVD rates it as Critical (CVSS 9.8). Consequences may include overwriting application or system files, and in environments with cron jobs or SSH, possibly code execution or persistence.

Affected

  • Langchain-Chatchat 0.3.1
  • Later releases: Unknown.

Fixed in

Unknown. No confirmed fixed version found.

Workaround

  • Remove internet exposure of the service (default port 7861) and restrict access to trusted networks.
  • Place authentication in front of the application, for example a reverse proxy with SSO or basic auth.
  • Restrict write access to the upload directory and monitor for unexpected new files.

Exploitation

  • CISA SSVC: exploitation status PoC, automatable: yes, technical impact: total.
  • Not listed in CISA KEV; no known exploitation in the wild.
  • A public proof of concept is reported by some sources but not confirmed by all.

Our recommendation

  • Identify all Langchain-Chatchat instances and their versions.
  • Remove direct internet exposure and add authentication immediately.
  • Check for unexpected files, especially in cron, SSH and application directories.
  • Track the upstream GitHub issues and apply a fixed version as soon as the vendor confirms one.
  • Do not assume a fix exists until it is confirmed.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 21:31.

Original description (NVD)

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.

NVD references (3)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.