Vulnerabilities in pkg:pypi/langchain-community

PACKAGE
Advisory Identifier: GHSA-pc6w-59fv-rh23
Advisory Summary

CVE-2025-6984 is a HIGH (CVSS 7.5) langchain community vulnerable to xml vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Langchain community libraries in the PyPI ecosystem. The issue involves langchain community vulnerable to xml external entity (xxe) attacks. Remediation is available by upgrading affected packages to version 0.3.27.

6 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/langchain-community

6 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/langchain-community. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pc6w-59fv-rh23 CVE-2025-6984 HIGH Langchain Community Vulnerable to XML External Entity (XXE) Attacks
GHSA-f2jm-rw3h-6phg CVE-2024-5998 HIGH LangChain pickle deserialization of untrusted data
GHSA-h5gc-rm8j-5gpr CVE-2025-2828 HIGH LangChain Community SSRF vulnerability exists in RequestsToolkit component
GHSA-45pg-36p6-83v9 CVE-2024-8309 LOW Langchain SQL Injection vulnerability
GHSA-3hjh-jh2h-vrg6 CVE-2024-2965 MODERATE Denial of service in langchain-community
GHSA-q25c-c977-4cmh CVE-2024-3095 MODERATE Server-Side Request Forgery in langchain-community.retrievers.web_research.WebResearchRetriever

CVE-2025-6984 at a Glance

CVE Identifier CVE-2025-6984
GHSA Identifier GHSA-pc6w-59fv-rh23
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Langchain community
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-6984

To remediate this vulnerability, upgrade all affected Langchain community dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langchain-community fixed: 0.3.27
pip install langchain-community>=0.3.27
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langchain-community

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-6984, inspect your installed packages using pip:

pip show langchain-community

Analyze the terminal output to locate any version of Langchain community in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.27), your application is affected.

Note: The pip show langchain-community command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Langchain community, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The langchain-ai/langchain project, specifically the EverNoteLoader component, is vulnerable to XML External Entity (XXE) attacks due to insecure XML parsing. 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. This issue has been fixed in 0.3.27 of langchain-community.

CVE-2025-6984 Affected Langchain community Versions

1 component(s)
Fixed Versions:
0.3.27
Product / Package Ecosystem Affected Versions Fixed Version
langchain-community
PyPI
< 0.3.27
0.3.27

References

Frequently Asked Questions

What is CVE-2025-6984?
CVE-2025-6984 is a security vulnerability in Langchain community involving Langchain Community Vulnerable to XML External Entity (XXE) Attacks under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Langchain community versions are affected?
Affected versions include releases prior to 0.3.27 across affected packages: langchain-community.
What version fixes CVE-2025-6984?
Upgrading to 0.3.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langchain-community affected?
Yes, langchain-community is affected in releases prior to 0.3.27. Upgrade your dependency to 0.3.27 or later.
What is the CVSS score of CVE-2025-6984?
CVE-2025-6984 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-6984?
CVE-2025-6984 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check PyPI dependencies for CVE-2025-6984?
Run the dependency tree command: 'pip show langchain-community'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pc6w-59fv-rh23",
  "modified" : "2025-09-05T15:28:25Z",
  "published" : "2025-09-04T12:30:42Z",
  "aliases" : [ "CVE-2025-6984" ],
  "summary" : "Langchain Community Vulnerable to XML External Entity (XXE) Attacks",
  "details" : "The langchain-ai/langchain project, specifically the EverNoteLoader component, is vulnerable to XML External Entity (XXE) attacks due to insecure XML parsing. 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. This issue has been fixed in 0.3.27 of langchain-community.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langchain-community"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.27"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-6984"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchain-community/commit/e842452108089524e22c3a2ced851c021884556f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langchain-ai/langchain-community"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchain/blob/d79b5813a0b3b243c612b77013768995e46c4337/libs/langchain/langchain/document_loaders/evernote.py#L1-L23"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/a6b521cf-258c-41c0-9edb-d8ef976abb2a"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-611" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-05T15:28:25Z",
    "nvd_published_at" : "2025-09-04T10:42:33Z"
  }
}