Security mailing lists by PureSourceCode

CVE-2025-6985

HIGH 7.5CVSS 3.0

LangChain Text Splitters is vulnerable to XML External Entity (XXE) attacks due to unsafe XSLT parsing

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.

Published
6 Oct 2025
Last modified
19 Oct 2026
Assigned by
security@huntr.dev
NVD status
Deferred
Weakness
CWE-611
Also known as
GHSA-m42m-m8cr-8m58PYSEC-2026-1520
Sources
NVDJSONOSV GHSA-m42m-m8cr-8m58JSONOSV PYSEC-2026-1520JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security@huntr.dev (Secondary) CVSS 3.0 HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
OSV GitHub CVSS 3.0 HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
OSV PyPA CVSS 3.0 HIGH 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV PyPI langchain-text-splitters < 0.3.9 0.3.9

References

History

  • 25 Nov 2026 20:59 UTC · NVD: first stored (published 6 Oct 2025)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Oct 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.