{"answers":{"affected":"3 open source packages ship an affected version, including langchain-text-splitters.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-6985 exists.","fix":"Upgrade langchain-text-splitters to 0.3.9 or later.","what":"CVE-2025-6985 is a high-severity vulnerability in langchain-ai/langchain, published on 6 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-6985 and fix it if it is affected.\n\nWhat it is: CVE-2025-6985 is a high-severity vulnerability in langchain-ai/langchain, published on 6 Oct 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-6985 exists.\n\nAffected packages and fixed versions:\n- langchain-text-splitters (PyPI): affected all versions; fixed in 0.3.9\n- langchain-text-splitters (PyPI): affected all versions; fixed in 0.3.9\n- langchain-text-splitters (PyPI): affected all versions; fixed in 0.3.9\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-6985/ (Markdown: https://insights.sbomify.com/CVE-2025-6985/index.md)","id":"CVE-2025-6985","markdown":"https://insights.sbomify.com/CVE-2025-6985/index.md","name":"CVE-2025-6985","record":{"aliases":["GHSA-m42m-m8cr-8m58","PYSEC-2026-1520","ROOT-APP-PYPI-CVE-2025-6985"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Python LangChain library","requires_auth":"none","summary":"Remote attackers can read arbitrary local files via XXE in HTMLSectionSplitter when custom XSLT is enabled.","user_interaction":"not_required","vuln_class":"xxe"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.0"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"XXE Vulnerability in langchain-ai/langchain","id":"CVE-2025-6985","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xxe","year":"2025"},"n_packages":3,"n_references":1,"next":{"headline":"FileBird – WordPress Media Library Folders \u0026 File Manager \u003c= 6.4.8 - Authenticated (Author+) SQL Injection","id":"CVE-2025-6986"},"packages":[{"ecosystem":"PyPI","fixed":["0.3.9"],"introduced":["0"],"last_affected":[],"package":"langchain-text-splitters","purl":null,"source":"GHSA-m42m-m8cr-8m58"},{"ecosystem":"PyPI","fixed":["0.3.9"],"introduced":["0"],"last_affected":[],"package":"langchain-text-splitters","purl":"pkg:pypi/langchain-text-splitters","source":"GHSA-m42m-m8cr-8m58"},{"ecosystem":"PyPI","fixed":["0.3.9"],"introduced":["0"],"last_affected":[],"package":"langchain-text-splitters","purl":"pkg:pypi/langchain-text-splitters","source":"PYSEC-2026-1520"}],"prev":{"headline":"Sensitive Information Disclosure Due to Insecure XML Parsing in langchain-ai/langchain","id":"CVE-2025-6984"},"products":["langchain-ai/langchain"],"published":"2025-10-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-10-06","vendors":["langchain-ai"]},"summary":"Remote attackers can read arbitrary local files via XXE in HTMLSectionSplitter when custom XSLT is enabled.","url":"https://insights.sbomify.com/CVE-2025-6985/"}