CVE-2025-6853: Langchain-Chatchat Path Traversal Vulnerability
Summary
CVE-2025-6853: Langchain-Chatchat has a Path Traversal vulnerability. Affects langchain-chatchat versions < 0.3.1.3. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Langchain-Chatchat is an open-source package designed for building chat applications using the Langchain framework. It provides functionalities for managing chat interactions and integrating various backend services. However, it has been found to be vulnerable to a path traversal attack, which could allow unauthorized access to the file system.
Vulnerability Detail
A critical vulnerability has been identified in Langchain-Chatchat versions up to 0.3.1. The issue arises in the 'upload_temp_docs' function located in the '/knowledge_base/upload_temp_docs' file. The manipulation of the 'flag' argument can lead to path traversal, allowing attackers to access files outside the intended directory structure. This vulnerability can be exploited remotely, posing a significant risk to the integrity and confidentiality of the system.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, you can restrict access to the affected function or validate the input parameters to prevent path traversal. For example, you can implement checks to ensure that the 'flag' argument does not contain any directory traversal sequences (e.g., '../').
Conclusion
The Langchain-Chatchat package has a critical path traversal vulnerability that can be exploited remotely. It is essential for users to update to the latest version to protect their applications from potential attacks. Utilizing tools like Vulert can further enhance security by monitoring for vulnerabilities.
See every vulnerability recorded for langchain-chatchat →
FAQ
A path traversal vulnerability allows an attacker to access files and directories that are stored outside the intended directory structure, potentially leading to unauthorized data exposure.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any installation.
Exploitation of this vulnerability could lead to unauthorized access to sensitive files, data leakage, and potential system compromise.
Yes, a patch is available in version 0.3.1.4 and later of Langchain-Chatchat. It is recommended to update to this version to mitigate the risk.
Vulert is a monitoring tool that uses Pipfile.lock to track open-source vulnerabilities in your software. It provides real-time alerts and insights into potential security issues.
Related vulnerabilities
Recent vulnerabilities recorded for langchain-chatchat.