# CVE-2025-6985: XXE Vulnerability in langchain-ai/langchain

- Priority: **Prioritise**
- Reason: Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2025-10-06 · Modified: 2025-10-06
- Aliases: GHSA-m42m-m8cr-8m58, PYSEC-2026-1520, CGA-9x7r-7m2q-57g7, CGA-c5gh-jr8v-27cr, CGA-gx4r-rqm5-5p95, CGA-xxfc-gxgx-86fg, CGA-585r-gp6x-rqx6, CGA-5rf3-8548-qp93, CGA-9f83-88hx-m2vg, CGA-f5qj-r789-vf9c, CGA-ff2c-2m4h-68c9, CGA-g764-534r-mqjf, CGA-mrw8-p7rm-47qp, CGA-p748-75jp-pwqf, CGA-pf9w-cp4r-w2gm, CGA-v8c3-4927-v7j4, CGA-vvw3-fx5m-m4fp, CGA-x7c7-cpwx-rmjf
- Record: https://cvemate.com/vulnerability/CVE-2025-6985 · JSON: https://cvemate.com/vulnerability/CVE-2025-6985/json

## 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.
```

## Signals

- CVSS: 7.5 high (v3.0, CVE.org) CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.522%, percentile 45.817%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard open-webui (Chainguard): \< 0.6.33-r0
- chainguard open-webui-compat (Chainguard): \< 0.6.33-r0
- chainguard py3-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- chainguard py3-supported-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- chainguard py3.10-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- chainguard py3.11-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- chainguard py3.12-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- chainguard py3.13-langchain-text-splitters (Chainguard): \< 0.3.11-r0
- wolfi open-webui (Wolfi): \< 0.6.33-r0
- wolfi open-webui-compat (Wolfi): \< 0.6.33-r0
- langchain-ai langchain-ai/langchain: ≥ unspecified, ≤ latest
- PyPI langchain-text-splitters (PyPI): \< 0.3.9

## References

- <https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-6985>
- <https://github.com/langchain-ai/langchain/pull/31819>
- <https://github.com/langchain-ai/langchain/commit/43eef435505a1c907227b724c0c760ad5fc01790>
- <https://github.com/langchain-ai/langchain>
- <https://pypi.org/project/langchain-text-splitters>
- <https://github.com/advisories/GHSA-m42m-m8cr-8m58>

---

Data as of 2026-12-05T13:03:11.799Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
