{"id":"CVE-2025-6985","published":"2025-10-06T17:58:29Z","modified":"2025-10-06T18:10:28Z","title":"XXE Vulnerability in langchain-ai/langchain","vendor":"langchain-ai","product":"langchain-ai/langchain","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00526,"percentile":0.45484,"provenance":"source"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"}],"references":[{"url":"https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331","tags":[]}],"priority":{"score":14.3,"factors":[{"name":"EPSS percentile","points":9.1},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-10-06T18:10:17.774029Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-text-splitters","vulnerableRanges":["<0.3.9"],"patched":["0.3.9"],"from":["GHSA-m42m-m8cr-8m58","PYSEC-2026-1520"],"provenance":"source"}],"summary":{"text":"The HTMLSectionSplitter class in langchain-text-splitters 0.3.8, part of the langchain-ai/langchain project, unsafely parses user-supplied XSLT stylesheets with lxml without hardening, leaving it open to XML External Entity attacks. A remote attacker with no authentication, privileges, or user interaction can read arbitrary files reachable by the LangChain process (such as SSH keys, environment files, or cloud metadata) and, on lxml 4.9.x and earlier, perform outbound HTTP(S) requests, in default deployments where custom XSLT is enabled.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:37:05Z"},"euvd":{"id":"EUVD-2025-31884","exploited":false,"provenance":"source"}}