Skip to content
HighVulnerability

CVE-2025-6985: HTMLSectionSplitter in langchain-text-splitters XXE via unsafe XSLT parsing

Identifier
CVE-2025-6985
Published
Record updated
View JSON
Affected
  • langchain-text-splitters < 0.3.9
Fixed in
0.3.9
  • released July 24, 2025, 74 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

CVE-2025-6985 affects the HTMLSectionSplitter class in langchain-text-splitters version 0.3.8. The class accepts arbitrary XSLT stylesheets and parses them with lxml.etree.parse() and lxml.etree.XSLT() without hardening, enabling XML External Entity (XXE) attacks. Remote attackers with no authentication, privileges or user interaction could read any file the LangChain process can reach, such as SSH keys, environment files, source code or cloud metadata, in default deployments that enable custom XSLT.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.