---
id: CVE-2026-51884
title: >-
  The /knowledge_base/upload_temp_docs temporary document upload endpoint in
  Langchain Chatchat 0.3.1 is vulnerable to path traversal
summary: >-
  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, bypas…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-22
published: '2026-10-01'
updated: '2026-10-05'
sourceUpdated: '2026-10-05T19:17:21.813'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-51884'
references:
  - url: 'https://gist.github.com/Ro1ME/da028c9ce13dd888e265b9bef01d6eca'
    label: cve@mitre.org
  - url: 'https://github.com/chatchat-space/Langchain-Chatchat/issues/5466'
    label: cve@mitre.org
  - url: 'https://github.com/chatchat-space/Langchain-Chatchat/issues/5466'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-10-05T18:55:27.818292Z'
epss: 0.00621
epssPercentile: 0.49576
ingestedAt: '2026-10-01T23:03:32.775Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
