# CVE-2026-51883: Langchain-Chatchat path traversal in knowledge base creation

Source: https://junglewise.ai/threats/cve-2026-51883-the-knowledge-base-creation-and-document-upload-interfaces-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-01. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

CVE-2026-51883 · Severity: info · Published 2026-10-01

Langchain-Chatchat is a knowledge base and document management system built on language models. Versions 0.3.0 and 0.3.1 allow attackers to write files to arbitrary locations on the server by injecting path traversal sequences into knowledge base names, potentially exposing sensitive data or enabling remote code execution through malicious file placement.

Technologies: [Chatchat-Space Langchain-Chatchat](https://junglewise.ai/threats/technologies/langchain-chatchat). Vendors: [Chatchat-Space](https://junglewise.ai/threats/vendors/chatchat-space).

## Quick answers

**Is CVE-2026-51883 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-51883 being exploited in the wild.

**How severe is CVE-2026-51883?** Informational severity, published 1 October 2026.

**Which products and versions are affected?** Chatchat-Space Langchain-Chatchat 0.3.0, 0.3.1.

**Is there a fix for CVE-2026-51883?** No fixed version is recorded yet. Restrict network access to the Langchain-Chatchat service and validate all `knowledge_base_name` inputs by rejecting names containing `../`, `..\ `, or absolute paths before path construction.</anigation>
</invoke> If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-51883 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-51883?** Check whether you run Chatchat-Space Langchain-Chatchat at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix


Restrict network access to the Langchain-Chatchat service and validate all `knowledge_base_name` inputs by rejecting names containing `../`, `..\ `, or absolute paths before path construction.</anigation>
</invoke>

## Technical details

The vulnerability is a directory traversal flaw in the knowledge base creation and document upload interfaces. User-controlled input in the `knowledge_base_name` parameter is passed directly to file path construction without sanitization, validation, or boundary checks. An attacker can inject sequences like `..\ ` (Windows) or `../` (Unix) to write files outside the configured knowledge base root directory, achieving arbitrary file write on the host system.

## Affected products

- Chatchat-space Langchain-Chatchat 0.3.0, 0.3.1

## Timeline

- 2026-04-20: disclosed
- 2026-10-01: advisory

## References

- [https://gist.github.com/Ro1ME/30f5139a2920bf7075299a33eb1690f2](https://gist.github.com/Ro1ME/30f5139a2920bf7075299a33eb1690f2)
- [https://github.com/chatchat-space/Langchain-Chatchat/issues/5467](https://github.com/chatchat-space/Langchain-Chatchat/issues/5467)

## Related threats

- [Langchain-Chatchat unauthenticated arbitrary command execution via tool invocation](https://junglewise.ai/threats/cve-2026-75128-langchain-chatchat-through-0-3-1-3-exposes-a-post-tools-call-api)
- [chatchat-space Langchain-Chatchat predictable file identifiers in OpenAI routes](https://junglewise.ai/threats/cve-2026-7847-chatchat-space-langchain-chatchat-predictable-file-identifiers-in)
- [chatchat-space Langchain-Chatchat TOCTOU in File Upload API](https://junglewise.ai/threats/cve-2026-7846-chatchat-space-langchain-chatchat-toctou-in-file-upload-api)
- [chatchat-space Langchain-Chatchat weak hash in Vision Chat Paste Image Handler](https://junglewise.ai/threats/cve-2026-7845-chatchat-space-langchain-chatchat-weak-hash-in-vision-chat-paste)
- [chatchat-space Langchain-Chatchat missing authentication in file endpoints](https://junglewise.ai/threats/cve-2026-7844-chatchat-space-langchain-chatchat-missing-authentication-in-file)
