CVE-2025-6853: Langchain chatchat Path Traversal Vulnerability
LOWCVE-2025-6853 is a LOW (CVSS 6.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Langchain chatchat libraries in the PyPI ecosystem. The issue involves langchain-chatchat has a path traversal vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2025-6853 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2025-6853
To remediate this vulnerability, upgrade all affected Langchain chatchat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install langchain-chatchat>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show langchain-chatchat
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-6853, inspect your installed packages using pip:
pip show langchain-chatchat
Analyze the terminal output to locate any version of Langchain chatchat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show langchain-chatchat command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Langchain chatchat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-6853 Affected Langchain chatchat Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
langchain-chatchat
|
PyPI |
≤ 0.3.1.3
|
|
References
Frequently Asked Questions
What is CVE-2025-6853?
Which Langchain chatchat versions are affected?
What version fixes CVE-2025-6853?
Is langchain-chatchat affected?
What is the CVSS score of CVE-2025-6853?
What CWE is associated with CVE-2025-6853?
How can I check PyPI dependencies for CVE-2025-6853?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qmgv-j263-qr33",
"modified" : "2025-09-16T19:32:50Z",
"published" : "2025-06-29T09:30:22Z",
"aliases" : [ "CVE-2025-6853" ],
"summary" : "Langchain-Chatchat has a Path Traversal vulnerability",
"details" : "A vulnerability classified as critical has been found in chatchat-space Langchain-Chatchat up to 0.3.1. This affects the function upload_temp_docs of the file /knowledge_base/upload_temp_docs of the component Backend. The manipulation of the argument flag leads to path traversal. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "langchain-chatchat"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.3.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-6853"
}, {
"type" : "WEB",
"url" : "https://github.com/chatchat-space/Langchain-Chatchat/issues/5352"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chatchat-space/Langchain-Chatchat"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.314325"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.314325"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?submit.601155"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-16T19:32:50Z",
"nvd_published_at" : "2025-06-29T08:15:21Z"
}
}