CVE-2025-6985
published high CVSS 3.0 · 7.5XXE Vulnerability in langchain-ai/langchain
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| langchain-ai | — | langchain-ai/langchainunspecified through latest | Affected | Not stated | @huntr_ai |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.0
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- @huntr_ai · cna
- Vector string
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain-ai/langchain | unspecified through latest (affected · custom) | @huntr_ai · cna |
Weaknesses
1- CWE-611 CWE-611 Improper Restriction of XML External Entity Reference
References
1Provider assertions
2@huntr_ai · cna
XXE Vulnerability in langchain-ai/langchain
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- a46ae903c447213ca7bd7033e68c4b7e723ad07fdc38d671ff66a7ed518daf49
- Ingested
- 23 Sep 2026, 08:57:58 UTC
- Source record
- Official CVE record