CVE-2025-6985: langchain-ai langchain-ai/langchain
Vulnerability summary
CVE-2025-6985 is a high (CVSS 7.5) vulnerability in langchain-ai langchain-ai/langchain. EPSS estimates a 0.51% chance of exploitation in the next 30 days, higher than 42.1% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 06-10-2025PublishedVulnerability first disclosed.
- 06-10-2025Last modifiedVulnerability information updated.
Description
The HTMLSectionSplitter class in langchain-text-splitters version 0.3.8 is vulnerable to XML External Entity (XXE) attacks due to unsafe XSLT parsing. This vulnerability arises because the class allows the use of arbitrary XSLT stylesheets, which are parsed using lxml.etree.parse() and lxml.etree.XSLT() without any hardening measures. In lxml versions up to 4.9.x, external entities are resolved by default, allowing attackers to read arbitrary local files or perform outbound HTTP(S) fetches. In lxml versions 5.0 and above, while entity expansion is disabled, the XSLT document() function can still read any URI unless XSLTAccessControl is applied. This vulnerability allows remote attackers to gain read-only access to any file the LangChain process can reach, including sensitive files such as SSH keys, environment files, source code, or cloud metadata. No authentication, special privileges, or user interaction are required, and the issue is exploitable in default deployments that enable custom XSLT.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · PypiEcosystem advisory · calculated7.5HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · WolfiEcosystem advisory · calculated7.5HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · ChainguardEcosystem advisory · calculated7.5HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- NVDNIST7.5HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
0.51%
Chance of exploitation in the next 30 days
Percentile
42%
Versus all other CVEs
30-day change
0.00 pp
From 0.51% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Chainguard8 products
- open-webui< 0.6.33-r0
- open-webui-compat< 0.6.33-r0
- py3-langchain-text-splitters< 0.3.11-r0
- py3-supported-langchain-text-splitters< 0.3.11-r0
- py3.10-langchain-text-splitters< 0.3.11-r0
Wolfi2 products
- open-webui< 0.6.33-r0
- open-webui-compat< 0.6.33-r0
Langchain-ai1 product
- langchain-ai/langchain≥ unspecified, ≤ latest
PyPI1 product
- langchain-text-splitters< 0.3.9
4 vendors · 12 products