CVE-2025-6985 Details
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.
A vulnerability allowing XML External Entity (XXE) attacks has been identified in the HTMLSectionSplitter class of langchain-text-splitters version 0.3.8. This issue stems from unsafe parsing of XSLT stylesheets, which are loaded using lxml without any protective measures. In lxml versions up to 4.9.x, external entities are resolved by default, enabling attackers to read arbitrary local files or make outbound HTTP(S) requests. Although lxml versions 5.0 and above disable entity expansion, the XSLT document() function can still access any URI unless XSLTAccessControl is applied. Exploiting this vulnerability allows remote attackers to gain read-only access to any file accessible by the LangChain process, including sensitive files like SSH keys, environment files, source code, or cloud metadata. The vulnerability requires no authentication, special privileges, or user interaction and is exploitable in default deployments that allow custom XSLT.
Users can update to langchain-text-splitters version 0.3.9 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 6, 2025CISA-ADP
Assessed Oct 6, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331 | [email protected] | ExploitIssue TrackingTechnical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-611 | Improper Restriction of XML External Entity Reference | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langchain-text-splitters | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 6, 2025 | New CVE Received | [email protected] |
Volerion