CVE-2025-6984: EverNoteLoader: XXE exposes host files in LangChain
GHSA-pc6w-59fv-rh23 HIGH PoC AVAILABLE NUCLEI TEMPLATE CISA: TRACK*Any LangChain deployment ingesting Evernote files (.enex) from untrusted sources is vulnerable to local file disclosure via XXE — attackers can read /etc/passwd, .env files, and cloud credentials off the host. Patch langchain-community to 0.3.27 immediately. Until patched, treat all external Evernote file ingestion as a critical-risk operation and restrict filesystem access of the process running LangChain.
Risk Assessment
High severity with near-zero exploitation complexity — XXE payloads are trivially crafted and require no authentication or user interaction (CVSS AV:N/AC:L/PR:N/UI:N). EPSS of 2% reflects limited active exploitation today, but LangChain's massive footprint in RAG and document processing pipelines makes this a high-value target with broad blast radius. Risk is elevated for organizations ingesting Evernote exports from third parties, customers, or automated workflows.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| langchain-community | pip | < 0.3.27 | 0.3.27 |
Do you use langchain-community? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
PATCH
Upgrade langchain-community to ≥0.3.27 immediately — the fix disables external entity resolution in etree.iterparse().
-
AUDIT
Enumerate all uses of EverNoteLoader and any XML-parsing document loaders across your LangChain deployments.
-
INPUT VALIDATION
Reject .enex files from untrusted sources at API/upload boundaries before they reach the loader.
-
LEAST PRIVILEGE
Run LangChain processes with read-only mounts and no access to /etc, credential stores, ~/.aws, or .env files using container security contexts or seccomp profiles.
-
NETWORK EGRESS
Block outbound HTTP/file connections from application servers to prevent out-of-band XXE data exfiltration.
-
DETECTION
Alert on anomalous file read patterns in application logs (paths: /etc/passwd, /proc/self/environ, ~/.aws/credentials, *.env).
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-6984?
Any LangChain deployment ingesting Evernote files (.enex) from untrusted sources is vulnerable to local file disclosure via XXE — attackers can read /etc/passwd, .env files, and cloud credentials off the host. Patch langchain-community to 0.3.27 immediately. Until patched, treat all external Evernote file ingestion as a critical-risk operation and restrict filesystem access of the process running LangChain.
Is CVE-2025-6984 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-6984, increasing the risk of exploitation.
How to fix CVE-2025-6984?
1. PATCH: Upgrade langchain-community to ≥0.3.27 immediately — the fix disables external entity resolution in etree.iterparse(). 2. AUDIT: Enumerate all uses of EverNoteLoader and any XML-parsing document loaders across your LangChain deployments. 3. INPUT VALIDATION: Reject .enex files from untrusted sources at API/upload boundaries before they reach the loader. 4. LEAST PRIVILEGE: Run LangChain processes with read-only mounts and no access to /etc, credential stores, ~/.aws, or .env files using container security contexts or seccomp profiles. 5. NETWORK EGRESS: Block outbound HTTP/file connections from application servers to prevent out-of-band XXE data exfiltration. 6. DETECTION: Alert on anomalous file read patterns in application logs (paths: /etc/passwd, /proc/self/environ, ~/.aws/credentials, *.env).
What systems are affected by CVE-2025-6984?
This vulnerability affects the following AI/ML architecture patterns: RAG pipelines, document processing pipelines, agent frameworks, data ingestion pipelines.
What is the CVSS score for CVE-2025-6984?
CVE-2025-6984 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 1.92%.
Technical Details
NVD Description
The langchain-ai/langchain project, specifically the EverNoteLoader component, is vulnerable to XML External Entity (XXE) attacks due to insecure XML parsing. The affected version is 0.3.63. The vulnerability arises from the use of etree.iterparse() without disabling external entity references, which can lead to sensitive information disclosure. An attacker could exploit this by crafting a malicious XML payload that references local files, potentially exposing sensitive data such as /etc/passwd.
Exploitation Scenario
An attacker uploads a crafted Evernote export file to a RAG-based document ingestion endpoint. The .enex file embeds an XXE payload: <!DOCTYPE foo [<!ENTITY xxe SYSTEM 'file:///etc/passwd'>]> referencing a local file. When EverNoteLoader processes it via unpatched etree.iterparse(), the external entity resolves and injects /etc/passwd contents into the parsed document. The attacker reads the exfiltrated data through the application response or infers it via error messages. They then iterate through high-value paths (/proc/self/environ, ~/.aws/credentials, /run/secrets/) to harvest cloud credentials. On a Kubernetes pod or cloud VM, this yields IAM tokens sufficient for lateral movement into the broader cloud environment.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N References
- github.com/advisories/GHSA-pc6w-59fv-rh23
- github.com/langchain-ai/langchain-community/commit/e842452108089524e22c3a2ced851c021884556f
- github.com/langchain-ai/langchain/blob/d79b5813a0b3b243c612b77013768995e46c4337/libs/langchain/langchain/document_loaders/evernote.py
- nvd.nist.gov/vuln/detail/CVE-2025-6984
- huntr.com/bounties/a6b521cf-258c-41c0-9edb-d8ef976abb2a
- github.com/ARPSyndicate/cve-scores Exploit
Timeline
Scanner Template Available
A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.
View template on GitHubnuclei -t code/cves/2025/CVE-2025-6984.yaml -u https://target.example.com Related Vulnerabilities
CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same package: langchain-community CVE-2024-8309 9.8 LangChain GraphCypher: prompt injection enables DB wipe
Same package: langchain-community CVE-2026-44843 8.2 LangChain: deserialization poisons LLM chat history
Same package: langchain-community CVE-2024-2965 4.2 langchain-community: DoS via recursive sitemap loop
Same package: langchain-community CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Leakage
AI Threat Alert