CVE-2025-6985
Full vulnerability record from the local CVENow database.
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.
View original CVE JSON
{
"id": "CVE-2025-6985",
"sourceIdentifier": "[email protected]",
"published": "2025-10-06T18:15:52.857",
"lastModified": "2026-10-19T16:10:00.260",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "La clase HTMLSectionSplitter en langchain-text-splitters versión 0.3.8 es vulnerable a ataques de entidad externa XML (XXE) debido a un análisis XSLT inseguro. Esta vulnerabilidad surge porque la clase permite el uso de hojas de estilo XSLT arbitrarias, las cuales son analizadas usando lxml.etree.parse() y lxml.etree.XSLT() sin ninguna medida de endurecimiento. En versiones de lxml hasta la 4.9.x, las entidades externas se resuelven por defecto, permitiendo a los atacantes leer archivos locales arbitrarios o realizar recuperaciones HTTP(S) salientes. En versiones de lxml 5.0 y superiores, si bien la expansión de entidades está deshabilitada, la función document() de XSLT aún puede leer cualquier URI a menos que se aplique XSLTAccessControl. Esta vulnerabilidad permite a atacantes remotos obtener acceso de solo lectura a cualquier archivo al que pueda acceder el proceso de LangChain, incluyendo archivos sensibles como claves SSH, archivos de entorno, código fuente o metadatos de la nube. No se requiere autenticación, privilegios especiales ni interacción del usuario, y el problema es explotable en implementaciones predeterminadas que habilitan XSLT personalizado."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "langchain-ai",
"product": "langchain-ai/langchain",
"versions": [
{
"version": "unspecified",
"lessThanOrEqual": "latest",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV30": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.0",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2025-10-06T18:10:17.774029Z",
"id": "CVE-2025-6985",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-611"
}
]
}
],
"references": [
{
"url": "https://huntr.com/bounties/cf78abbb-df3b-43de-b6ee-132b73ff8331",
"source": "[email protected]"
}
]
}