Read the docs
TI-2025-06353 Aliases CVE-2025-6985GHSA-m42m-m8cr-8m58

XXE Vulnerability in langchain-ai/langchain

Priority HIGH 72CWE-611Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Partial Red Hat: 1 fixed, 2 without a fix

Attack profile from CVSS 3.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-611 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00508 43rd percentileScored 2026-11-07
Fix Partial langchain-text-splitters (PyPI): 0.3.9Red Hat: 1 advisoryRed Hat: 1 fixed, 2 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
langchain-ailangchain-ai/langchainup to latest—No fix listedCNA
—langchain-text-splitters (PyPI)before 0.3.90.3.9Patch availableGHSA-m42m-m8cr-8m58
  • langchain-ai/langchain Vendorlangchain-ai Affected up to latest Fixed in — No fix listed CNA
  • langchain-text-splitters (PyPI) Vendor— Affected before 0.3.9 Fixed in 0.3.9 Patch available GHSA-m42m-m8cr-8m58

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*——langchain-ai
  • cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:* Versions — — ·langchain-ai

Remediation

  • Fix · GHSA-m42m-m8cr-8m58 langchain-text-splitters (PyPI) Fixed in 0.3.9 Advisory →

Red Hat 1 advisory

  • RHSA-2025:18984 Released 2025-10-22 · Red Hat rating Important
    Red Hat Ansible Automation Platform 2.5 Container Release Update
    • Red Hat Ansible Automation Platform 2.5 for RHEL 8 ansible-automation-platform-25/lightspeed-chatbot-rhel8, ansible-automation-platform-25/lightspeed-rhel8

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat Enterprise Linux AI (RHEL AI)AffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2.5 for RHEL 8Fixed RHSA-2025:18984
Not affected: 4 products
  • OpenShift Lightspeed
  • Red Hat Ansible Automation Platform 2
  • Red Hat Ansible Automation Platform 2.5 for RHEL 8
  • Red Hat Ansible Automation Platform 2.5 for RHEL 9

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-6985
  2. 2026-10-03 Alias added: GHSA-m42m-m8cr-8m58

References

  • TI-2024-31340 langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain… CVSS 3.1CRITICAL 9.8
  • TI-2023-20724 An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
  • TI-2023-20706 An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary… CVSS 3.1CRITICAL 9.8
  • TI-2023-20166 An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
  • TI-2023-20136 An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. CVSS 3.1CRITICAL 9.8
  • TI-2023-18185 An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a… CVSS 3.1CRITICAL 9.8
See all 75 →

Sources