CVE-2025-6985
Python vulnerability analysis and mitigation

Overview

The HTMLSectionSplitter class in langchain-text-splitters version 0.3.8 contains an XML External Entity (XXE) vulnerability (CVE-2025-6985) discovered on October 6, 2025. This vulnerability affects the default deployments that enable custom XSLT functionality (NVD, Red Hat).

Technical details

The vulnerability arises from unsafe XSLT parsing where the class allows the use of arbitrary XSLT stylesheets, which are parsed using lxml.etree.parse() and lxml.etree.XSLT() without proper hardening measures. In lxml versions up to 4.9.x, external entities are resolved by default, while in lxml versions 5.0 and above, although entity expansion is disabled, the XSLT document() function can still read any URI unless XSLTAccessControl is applied. The vulnerability has been assigned a CVSS v3.0 base score of 7.5 (High) with vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (NVD).

Impact

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. The attack requires no authentication, special privileges, or user interaction (NVD).

Mitigation and workarounds

According to Red Hat's security advisory, mitigation options for this issue are either not available or do not meet their Product Security criteria for ease of use, deployment, and applicability to widespread installation base or stability (Red Hat).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61784HIGH7.6
  • PythonPython
  • llamafactory
NoNoOct 07, 2025
CVE-2025-6985HIGH7.5
  • PythonPython
  • langchain-text-splitters
NoYesOct 06, 2025
CVE-2025-59152HIGH7.5
  • PythonPython
  • litestar
NoYesOct 06, 2025
CVE-2025-61765MEDIUM6.4
  • PythonPython
  • python-socketio
NoYesOct 06, 2025
CVE-2025-61672MEDIUM5.3
  • PythonPython
  • matrix-synapse
NoYesOct 08, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management