Bug 2401958 (CVE-2025-6985) - CVE-2025-6985 langchain-text-splitters: XXE Vulnerability in langchain-text-splitters
Summary: CVE-2025-6985 langchain-text-splitters: XXE Vulnerability in langchain-text-s...
Keywords:
Status: NEW
Alias: CVE-2025-6985
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-10-06 19:01 UTC by OSIDB Bzimport
Modified: 2025-10-22 16:41 UTC (History)
32 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:18984 0 None None None 2025-10-22 16:41:45 UTC

Description OSIDB Bzimport 2025-10-06 19:01:29 UTC
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.

Comment 2 errata-xmlrpc 2025-10-22 16:41:42 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.5 for RHEL 8
  Red Hat Ansible Automation Platform 2.5 for RHEL 9

Via RHSA-2025:18984 https://access.redhat.com/errata/RHSA-2025:18984


Note You need to log in before you can comment on or make changes to this bug.