LangChain Text Splitters
CVE-2025-6985
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted XSLT stylesheet to app
-
DeliveryHTMLSectionSplitter parses it via lxml
-
ExploitExternal entity/document() resolves URI
-
ExecutionRead local file or SSRF fetch
-
ImpactExfiltrate sensitive file contents
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML external entity prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the hosting application to use the HTMLSectionSplitter class in langchain-text-splitters 0.3.8 AND to permit attacker-influenced custom XSLT stylesheets, which are processed by lxml.etree.parse()/lxml.etree.XSLT() without XSLTAccessControl hardening. Severity of the primitive depends on the lxml version: lxml up to 4.9.x resolves external entities by default (full XXE file read and outbound HTTP(S) fetch), while lxml 5.0+ disables entity expansion but still allows the XSLT document() function to read arbitrary URIs unless XSLTAccessControl is applied. The key limiting factor is deployment design: if the application never exposes custom/user-supplied XSLT to the splitter, the vulnerable path is not reachable. No authentication, special privileges, or user interaction are required once that path is exposed. |
| Impact | Signals are mostly aligned toward moderate, conditional risk rather than urgent priority. The CVSS 3.0 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, 7.5 High) describes a network-reachable, unauthenticated, low-complexity information-disclosure flaw with high confidentiality impact but no integrity or availability impact - consistent with an XXE file-read primitive. However, that score assumes the attacker can reach the vulnerable code path, which the description itself qualifies: exploitation applies to 'default deployments that enable custom XSLT,' meaning the hosting application must expose arbitrary attacker-controlled XSLT stylesheets to HTMLSectionSplitter. This is an important caveat the raw CVSS does not capture. The EPSS score is low (0.51%, 42nd percentile), the CVE is NOT in CISA KEV, and no exploit is explicitly flagged in the input, so there is no evidence of active or widespread exploitation. The single reference is a huntr.dev bug-bounty submission, which typically includes reproduction detail, but POC status is not confirmed in the provided data. Net: a genuine, verifiable confidentiality weakness in a popular library, but real-world risk is gated by whether a given application passes untrusted XSLT into the splitter - more a latent integration risk than a broadly wormable issue. Note also the CVSS 3.0 impact of C:H with I:N/A:N accurately reflects read-only file/SSRF access rather than code execution. |
| Exploit ScenarioDerived | An application that uses langchain-text-splitters 0.3.8 and lets users supply or influence a custom XSLT stylesheet for HTMLSectionSplitter accepts an attacker-crafted stylesheet containing an external entity or a document() reference. When lxml.etree.parse()/XSLT() processes it without XSLTAccessControl hardening, the parser resolves the external URI, returning the contents of a local file (e.g. ~/.ssh/id_rsa, .env) or performing an outbound fetch to cloud metadata endpoints. No authentication or user interaction is required; the data is reflected back or exfiltrated to an attacker-controlled host. A huntr.dev bounty report exists, but a public weaponized exploit is not confirmed in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
XML External Entity (XXE) in LangChain Text Splitters 0.3.8 allows unauthenticated remote attackers to read arbitrary files or make outbound HTTP(S) requests when an application uses HTMLSectionSplitter with attacker-influenced XSLT stylesheets. The vulnerable path is only reachable if the hosting application permits custom XSLT and processes it via lxml.etree.parse()/lxml.etree.XSLT() without XSLTAccessControl; lxml up to 4.9.x resolves external entities by default, while lxml 5.0+ still permits URI reads through the XSLT document() function. EPSS is 0.51% (42nd percentile) and no public exploit code or CISA KEV entry was identified at time of analysis.
RemediationAI
No vendor-released patch was identified in the provided data. Until a fixed langchain-text-splitters release is available, do not pass attacker-influenced or user-supplied XSLT stylesheets into HTMLSectionSplitter; restrict the splitter to fixed, trusted stylesheets and treat custom XSLT as code. If dynamic XSLT is required, patch or fork HTMLSectionSplitter to construct lxml parsers with resolve_entities=False, load_dtd=False, and no_network=True and to pass XSLTAccessControl with file, directory, and network access disabled to lxml.etree.XSLT(); the trade-off is that legitimate stylesheets relying on document() or external resources will fail, and the forked code must be maintained. Upgrading lxml to 5.0 or later is useful defense-in-depth but does not by itself close the document() URI-read path because the splitter still must apply XSLTAccessControl. Monitor the huntr report at https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331 for remediation updates.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HTMLSectionSplitter in langchain-text-splitters 0.3.8 builds splitting behavior from XSLT stylesheets and invokes lxml.etree.parse() and lxml.etree.XSLT() directly. The root cause is CWE-611: the parser and XSLT processor are not hardened with XSLTAccessControl, so external entity resolution or the XSLT document() function can dereference attacker-controlled URIs. In lxml up to 4.9.x, external entities are resolved by default, enabling local file disclosure and outbound HTTP(S) fetches; in lxml 5.0 and above, entity expansion is disabled but document() can still read any URI the process can access unless access control is applied. The class therefore exposes read-only access to files such as SSH keys, environment files, source code, or cloud metadata, but only when the application allows untrusted custom XSLT to reach the splitter.
Know when Langchain gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Network-reachable unauthenticated XXE file read with no UI; read-only disclosure gives C:H and I:N/A:N; scope unchanged as the vulnerable process reads files directly.
Primary rating from Vendor (huntr).
CVSS VectorVendor: huntr
DescriptionCVE.org
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.
Executive ViewAI
LangChain Text Splitters 0.3.8 can expose sensitive local files or initiate outbound network requests in applications that allow attacker-influenced XSLT stylesheets in the HTMLSectionSplitter component. Leadership should care because affected document-processing or ingestion services could leak data or be abused to reach restricted internal resources; ownership sits with teams running LangChain-based pipelines.
No vendor-released patch identified; disable custom or attacker-controlled XSLT in HTMLSectionSplitter, enforce lxml XSLTAccessControl denying file and network access, block document() external URI retrieval, restrict outbound egress, run with least privilege, and monitor for anomalous file reads or outbound requests.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
XML External Entity (XXE) attacks exploit XML parsers that process Document Type Definitions (DTDs) without proper restrictions.
Code injection in Langflow CSV Agent node before 1.8.0. The node hardcodes allow_dangerous_code=True, enabling arbitrary
An issue in Harrison Chase langchain v.0.0.194 allows an attacker to execute arbitrary code via the python exec calls in
A remote code execution vulnerability in langchain-ai/langchain (CVSS 10.0). Risk factors: public PoC available. Vendor
A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through
A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this cl
langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbit
A vulnerability was found in LangChain langchain_community 0.0.26. Rated critical severity (CVSS 9.8), this vulnerabilit
An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function
An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a JSON file to load_prompt. Rated
An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to execute arbitrary code via a crafted
An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to execute arbitrary code via the fro
An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. Rated criti
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB