XXE Vulnerability in langchain-ai/langchain
Published Oct 6, 2025
7.5
HIGHCVSS 3.1
EPSS 0.51%
Description
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.
Affected products
-
- Version unspecifiedStatusaffectedConstraints<=latest
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Langchain-AI | Langchain-Ai/langchain | n/a |
|
No data.
No data.
Red Hat Ansible Automation Platform 2.5 for RHEL 8
ansible-automation-platform-25/lightspeed-rhel8:2.5.250924-2
Fixed · RHSA-2025:18984
OpenShift Lightspeed
openshift-lightspeed/lightspeed-service-api-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/de-minimal-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/de-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/de-supported-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/de-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/ee-minimal-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/ee-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/ee-supported-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/ee-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/lightspeed-rhel8
Will not fix
Red Hat Ansible Automation Platform 2
ansible-automation-platform-24/platform-resource-runner-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/aap-cloud-metrics-collector-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ansible-dev-tools-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/de-minimal-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/de-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/de-supported-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/de-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ee-cloud-services-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ee-minimal-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ee-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ee-supported-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/ee-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/lightspeed-chatbot-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-25/platform-resource-runner-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/ansible-dev-tools-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/de-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/de-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/ee-minimal-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/ee-supported-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/lightspeed-rhel9
Affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-26/platform-resource-runner-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform-tech-preview/ansible-devspaces-rhel9
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform/ee-minimal-rhel8
Not affected
Red Hat Ansible Automation Platform 2
ansible-automation-platform/ee-minimal-rhel9
Not affected
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-amd-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-aws-nvidia-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-azure-amd-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-azure-nvidia-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-gcp-nvidia-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-intel-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/bootc-nvidia-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/instructlab-amd-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/instructlab-intel-rhel9
Will not fix
Red Hat Enterprise Linux AI (RHEL AI)
rhelai1/instructlab-nvidia-rhel9
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | ansible-automation-platform-25/lightspeed-rhel8:2.5.250924-2 | Fixed | RHSA-2025:18984 |
| OpenShift Lightspeed | openshift-lightspeed/lightspeed-service-api-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/de-minimal-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/de-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/de-supported-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/de-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/ee-minimal-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/ee-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/ee-supported-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/ee-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/lightspeed-rhel8 | Will not fix | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/platform-resource-runner-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/aap-cloud-metrics-collector-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ansible-dev-tools-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/de-minimal-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/de-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/de-supported-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/de-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ee-cloud-services-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ee-minimal-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ee-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ee-supported-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/ee-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/lightspeed-chatbot-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/platform-resource-runner-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/ansible-dev-tools-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/de-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/de-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/ee-minimal-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/ee-supported-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/lightspeed-rhel9 | Affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-26/platform-resource-runner-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-tech-preview/ansible-devspaces-rhel9 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform/ee-minimal-rhel8 | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform/ee-minimal-rhel9 | Not affected | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-amd-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-aws-nvidia-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-azure-amd-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-azure-nvidia-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-gcp-nvidia-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-intel-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-nvidia-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/instructlab-amd-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/instructlab-intel-rhel9 | Will not fix | n/a |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/instructlab-nvidia-rhel9 | Will not fix | n/a |
No package ranges for this CVE.
Remediation
Red Hat mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
References (8)
- https://access.redhat.com/security/cve/CVE-2025-6985 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2401958 Issue Tracking
- https://github.com/advisories/GHSA-m42m-m8cr-8m58 Advisory
- https://github.com/langchain-ai/langchain/commit/43eef435505a1c907227b724c0c760ad5fc01790
- https://github.com/langchain-ai/langchain/pull/31819
- https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331
- https://nvd.nist.gov/vuln/detail/CVE-2025-6985
- https://www.cve.org/CVERecord?id=CVE-2025-6985
Change history (0)
No recorded changes yet.