CVE-2025-2828: Langchain community LangChain Community SSRF Vulnerability Exists Vulnerability

HIGH
Advisory Identifier: GHSA-h5gc-rm8j-5gpr
CVSS 8.4
CWE-918
Published
Advisory Summary

CVE-2025-2828 is a HIGH (CVSS 8.4) langchain community ssrf vulnerability exists vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Langchain community libraries in the PyPI ecosystem. The issue involves langchain community ssrf vulnerability exists in requeststoolkit component. Remediation is available by upgrading affected packages to version 0.0.28.

CVE-2025-2828 at a Glance

CVE Identifier CVE-2025-2828
GHSA Identifier GHSA-h5gc-rm8j-5gpr
Severity HIGH
CVSS v3.1 Base Score 8.4
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Langchain community
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.4

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

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

How to Fix CVE-2025-2828

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.0.28
pip install langchain-community>=0.0.28
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-2828, 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.0.28), 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. 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

A Server-Side Request Forgery (SSRF) vulnerability exists in the RequestsToolkit component of the langchain-community package (specifically, langchain_community.agent_toolkits.openapi.toolkit.RequestsToolkit) in langchain-ai/langchain version 0.0.27. This vulnerability occurs because the toolkit does not enforce restrictions on requests to remote internet addresses, allowing it to also access local addresses. As a result, an attacker could exploit this flaw to perform port scans, access local services, retrieve instance metadata from cloud environments (e.g., Azure, AWS), and interact with servers on the local network. This issue has been fixed in version 0.0.28.

CVE-2025-2828 Affected Langchain community Versions

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

References

Frequently Asked Questions

What is CVE-2025-2828?
CVE-2025-2828 is a security vulnerability in Langchain community involving LangChain Community SSRF vulnerability exists in RequestsToolkit component under CWE-918: Server-Side Request Forgery (SSRF).
Which Langchain community versions are affected?
Affected versions include releases prior to 0.0.28 across affected packages: langchain-community.
What version fixes CVE-2025-2828?
Upgrading to 0.0.28 (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.0.28. Upgrade your dependency to 0.0.28 or later.
What is the CVSS score of CVE-2025-2828?
CVE-2025-2828 has a CVSS v3.1 base score of 8.4 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2025-2828?
CVE-2025-2828 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2025-2828?
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-h5gc-rm8j-5gpr",
  "modified" : "2025-07-17T21:58:01Z",
  "published" : "2025-06-23T21:31:56Z",
  "aliases" : [ "CVE-2025-2828" ],
  "summary" : "LangChain Community SSRF vulnerability exists in RequestsToolkit component ",
  "details" : "A Server-Side Request Forgery (SSRF) vulnerability exists in the RequestsToolkit component of the langchain-community package (specifically, langchain_community.agent_toolkits.openapi.toolkit.RequestsToolkit) in langchain-ai/langchain version 0.0.27. This vulnerability occurs because the toolkit does not enforce restrictions on requests to remote internet addresses, allowing it to also access local addresses. As a result, an attacker could exploit this flaw to perform port scans, access local services, retrieve instance metadata from cloud environments (e.g., Azure, AWS), and interact with servers on the local network. This issue has been fixed in version 0.0.28.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langchain-community"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.28"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-2828"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchain/commit/e188d4ecb085d4561a0be3c583d26aa9c2c3283f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchain-community"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/langchain-community/PYSEC-2025-70.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/8f771040-7f34-420a-b96b-5b93d4a99afc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-25T18:45:48Z",
    "nvd_published_at" : "2025-06-23T21:15:25Z"
  }
}