CVE-2026-26019: @langchain/community @langchain/community Affected By SSRF Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-gf3v-fwqg-4vh7
CVSS 4.1
CWE-918
Published
Advisory Summary

CVE-2026-26019 is a MODERATE (CVSS 4.1) @langchain/community affected by ssrf bypass vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @langchain/community libraries in the npm ecosystem. The issue involves @langchain/community affected by ssrf bypass in recursiveurlloader via insufficient url origin validation. Remediation is available by upgrading affected packages to version 1.1.14.

CVE-2026-26019 at a Glance

CVE Identifier CVE-2026-26019
GHSA Identifier GHSA-gf3v-fwqg-4vh7
Severity MODERATE
CVSS v3.1 Base Score 4.1
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product @langchain/community
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.1

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

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

How to Fix CVE-2026-26019

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: 1.1.14
npm install @langchain/community@1.1.14
Verify Direct and Transitive Dependencies

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

npm ls @langchain/community

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-26019, inspect your project dependencies using npm:

npm ls @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 1.1.14), your application is affected.

Note: The npm ls @langchain/community command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

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

## Description The `RecursiveUrlLoader` class in `@langchain/community` is a web crawler that recursively follows links from a starting URL. Its `preventOutside` option (enabled by default) is intended to restrict crawling to the same site as the base URL. The implementation used `String.startsWith()` to compare URLs, which does not perform semantic URL validation. An attacker who controls content on a crawled page could include links to domains that share a string prefix with the target (e.g., `https://example.com.attacker.com` passes a `startsWith` check against `https://example.com`), causing the crawler to follow links to attacker-controlled or internal infrastructure. Additionally, the crawler performed no validation against private or reserved IP addresses. A crawled page could include links targeting cloud metadata services (`169.254.169.254`), localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. ## Impact An attacker who can influence the content of a page being crawled (e.g., by placing a link on a public-facing page, forum, or user-generated content) could cause the crawler to: - Fetch cloud instance metadata (AWS, GCP, Azure), potentially exposing IAM credentials and session tokens - Access internal services on private networks (`10.x`, `172.16.x`, `192.168.x`) - Connect to localhost services - Exfiltrate response data via attacker-controlled redirect chains This is exploitable in any environment where `RecursiveUrlLoader` runs on infrastructure with access to cloud metadata or internal services — which includes most cloud-hosted deployments. ## Resolution Two changes were made: 1. **Origin comparison replaced.** The `startsWith` check was replaced with a strict origin comparison using the URL API (`new URL(link).origin === new URL(baseUrl).origin`). This correctly validates scheme, hostname, and port as a unit, preventing subdomain-based bypasses. 2. **SSRF validation added to all fetch operations.** A new URL validation module (`@langchain/core/utils/ssrf`) was introduced and applied before every outbound fetch in the crawler. This blocks requests to: - **Cloud metadata endpoints:** `169.254.169.254`, `169.254.170.2`, `100.100.100.200`, `metadata.google.internal`, and related hostnames - **Private IP ranges:** `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `127.0.0.0/8`, `169.254.0.0/16` - **IPv6 equivalents:** `::1`, `fc00::/7`, `fe80::/10` - **Non-HTTP/HTTPS schemes** (`file:`, `ftp:`, `javascript:`, etc.) Cloud metadata endpoints are unconditionally blocked and cannot be overridden. ## Workarounds Users who cannot upgrade immediately should avoid using `RecursiveUrlLoader` on untrusted or user-influenced content, or should run the crawler in a network environment without access to cloud metadata or internal services.

CVE-2026-26019 Affected @langchain/community Versions

1 component(s)
Fixed Versions:
1.1.14
Product / Package Ecosystem Affected Versions Fixed Version
@langchain/community
npm
< 1.1.14
1.1.14

References

Frequently Asked Questions

What is CVE-2026-26019?
CVE-2026-26019 is a security vulnerability in @langchain/community involving @langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation under CWE-918: Server-Side Request Forgery (SSRF).
Which @langchain/community versions are affected?
Affected versions include releases prior to 1.1.14 across affected packages: @langchain/community.
What version fixes CVE-2026-26019?
Upgrading to 1.1.14 (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 1.1.14. Upgrade your dependency to 1.1.14 or later.
What is the CVSS score of CVE-2026-26019?
CVE-2026-26019 has a CVSS v3.1 base score of 4.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2026-26019?
CVE-2026-26019 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 npm dependencies for CVE-2026-26019?
Run the dependency tree command: 'npm ls @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-gf3v-fwqg-4vh7",
  "modified" : "2026-02-12T14:19:06Z",
  "published" : "2026-02-11T15:13:20Z",
  "aliases" : [ "CVE-2026-26019" ],
  "summary" : "@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation",
  "details" : "## Description\n\nThe `RecursiveUrlLoader` class in `@langchain/community` is a web crawler that recursively follows links from a starting URL. Its `preventOutside` option (enabled by default) is intended to restrict crawling to the same site as the base URL.\n\nThe implementation used `String.startsWith()` to compare URLs, which does not perform semantic URL validation. An attacker who controls content on a crawled page could include links to domains that share a string prefix with the target (e.g., `https://example.com.attacker.com` passes a `startsWith` check against `https://example.com`), causing the crawler to follow links to attacker-controlled or internal infrastructure.\n\nAdditionally, the crawler performed no validation against private or reserved IP addresses. A crawled page could include links targeting cloud metadata services (`169.254.169.254`), localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction.\n\n## Impact\n\nAn attacker who can influence the content of a page being crawled (e.g., by placing a link on a public-facing page, forum, or user-generated content) could cause the crawler to:\n\n- Fetch cloud instance metadata (AWS, GCP, Azure), potentially exposing IAM credentials and session tokens\n- Access internal services on private networks (`10.x`, `172.16.x`, `192.168.x`)\n- Connect to localhost services\n- Exfiltrate response data via attacker-controlled redirect chains\n\nThis is exploitable in any environment where `RecursiveUrlLoader` runs on infrastructure with access to cloud metadata or internal services — which includes most cloud-hosted deployments.\n\n## Resolution\n\nTwo changes were made:\n\n1. **Origin comparison replaced.** The `startsWith` check was replaced with a strict origin comparison using the URL API (`new URL(link).origin === new URL(baseUrl).origin`). This correctly validates scheme, hostname, and port as a unit, preventing subdomain-based bypasses.\n\n2. **SSRF validation added to all fetch operations.** A new URL validation module (`@langchain/core/utils/ssrf`) was introduced and applied before every outbound fetch in the crawler. This blocks requests to:\n   - **Cloud metadata endpoints:** `169.254.169.254`, `169.254.170.2`, `100.100.100.200`, `metadata.google.internal`, and related hostnames\n   - **Private IP ranges:** `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `127.0.0.0/8`, `169.254.0.0/16`\n   - **IPv6 equivalents:** `::1`, `fc00::/7`, `fe80::/10`\n   - **Non-HTTP/HTTPS schemes** (`file:`, `ftp:`, `javascript:`, etc.)\n\nCloud metadata endpoints are unconditionally blocked and cannot be overridden.\n\n## Workarounds\n\nUsers who cannot upgrade immediately should avoid using `RecursiveUrlLoader` on untrusted or user-influenced content, or should run the crawler in a network environment without access to cloud metadata or internal services.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@langchain/community"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.14"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.1.13"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-gf3v-fwqg-4vh7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-26019"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchainjs/pull/9990"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchainjs/commit/d5e3db0d01ab321ec70a875805b2f74aefdadf9d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langchain-ai/langchainjs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcommunity%401.1.14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-11T15:13:20Z",
    "nvd_published_at" : "2026-02-11T22:15:51Z"
  }
}