GHSA-m42m-m8cr-8m58

Suggest an improvement
Source
https://github.com/advisories/GHSA-m42m-m8cr-8m58
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-m42m-m8cr-8m58/GHSA-m42m-m8cr-8m58.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m42m-m8cr-8m58
Aliases
  • CVE-2025-6985
Related
Published
2025-10-06T18:31:07Z
Modified
2026-02-04T03:26:48.627970Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
LangChain Text Splitters is vulnerable to XML External Entity (XXE) attacks due to unsafe XSLT parsing
Details

The HTMLSectionSplitter class in langchain-text-splitters 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.

Database specific
{
    "nvd_published_at": "2025-10-06T18:15:52Z",
    "github_reviewed_at": "2025-10-07T21:32:54Z",
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-611"
    ],
    "github_reviewed": true
}
References

Affected packages

PyPI / langchain-text-splitters

Package

Name
langchain-text-splitters
View open source insights on deps.dev
Purl
pkg:pypi/langchain-text-splitters

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.3.9

Affected versions

0.*
0.0.1
0.0.2
0.2.0
0.2.1
0.2.2
0.2.4
0.3.0.dev0
0.3.0.dev1
0.3.0
0.3.1
0.3.2
0.3.3
0.3.4
0.3.5
0.3.6rc1
0.3.6rc2
0.3.6
0.3.7
0.3.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-m42m-m8cr-8m58/GHSA-m42m-m8cr-8m58.json"