Description
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.
Published: 2026-10-01
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary File Write
Action: Apply Patch
AI Analysis

Impact

The /knowledge_base/upload_temp_docs endpoint in Langchain Chatchat 0.3.1 does not properly sanitize the filename supplied by a client. This oversight enables an attacker to supply filenames that include traversal components such as '../', allowing the server to write the uploaded file to any location on the filesystem. An attacker can thus place executable code, modify configuration files, or overwrite critical data, effectively achieving remote code execution or data tampering. This reflects a Path Traversal weakness identified as CWE‑22.

Affected Systems

The affected product is Langchain Chatchat version 0.3.1. No other versions are explicitly listed in the data, so use of this version in any environment presents the same vulnerability. The vendor is not named in the CNA data, but the repository referenced in the advisory indicates the source code is hosted by the Chatchat‑space team.

Risk and Exploitability

The CVSS score of 9.8 and the EPSS score of < 1% indicate a high‑severity flaw with a low but non‑zero probability of exploitation. Despite not being listed in CISA’s KEV catalog, the potential for arbitrary file write remains significant. Attackers can reach the /knowledge_base/upload_temp_docs endpoint over the network, craft a malicious filename with traversal components, and then place any file, including executables, in any location on the server. This could lead to remote code execution, data tampering, or disruption of service.

Generated by OpenCVE AI on October 5, 2026 at 21:20 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Langchain Chatchat to the latest release where the upload path traversal protection has been implemented or apply the upstream patch from the repository if available.
  • As an interim measure, restrict the permissions of the temporary directory to the minimal set required for the application and configure the web server to refuse writes to the directory from requests matching traversal patterns (e.g., deny file names containing '..' or absolute paths).
  • Implement monitoring or logging for unexpected file creation or modification events in critical directories, and set up alerts for such anomalies.

Generated by OpenCVE AI on October 5, 2026 at 21:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 05 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Title Path Traversal Allowing Arbitrary File Write in Langchain Chatchat Temporary Upload Endpoint

Mon, 05 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 01 Oct 2026 23:30:00 +0000

Type Values Removed Values Added
Title Path Traversal Allowing Arbitrary File Write in Langchain Chatchat Temporary Upload Endpoint
Weaknesses CWE-22

Thu, 01 Oct 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Chatchat-space
Chatchat-space langchain-chatchat
Vendors & Products Chatchat-space
Chatchat-space langchain-chatchat

Thu, 01 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Description 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.
References

Subscriptions

Chatchat-space Langchain-chatchat
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-10-05T18:56:05.675Z

Reserved: 2026-06-08T00:00:00.000Z

Link: CVE-2026-51884

cve-icon Vulnrichment

Updated: 2026-10-05T18:56:00.692Z

cve-icon NVD

Status : Deferred

Published: 2026-10-01T22:17:03.257

Modified: 2026-10-05T19:17:21.813

Link: CVE-2026-51884

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-05T21:30:19Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')