{"id":"CVE-2026-26019","aliases":["EUVD-2026-6211","GHSA-gf3v-fwqg-4vh7","ROOT-APP-NPM-CVE-2026-26019"],"status":"published","title":"@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation","description":"LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, 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, 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, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.","severity":{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00394,"percentile":0.33883,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-918"],"published":"2026-02-11T15:13:20Z","modified":"2026-10-28T02:30:31Z","fixes":[{"ecosystem":"npm","package":"@langchain/community","fixed_in":["1.1.14"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"@rootio/langchain__community","fixed_in":["0.3.45-root.io.2","0.3.45-root.io.3","0.3.45-root.io.4","0.3.45-root.io.5"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@langchain/community","fixed_in":["0.3.45-aikido.5"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@langchain/community","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.1.13"},{"fixed":"1.1.14"}]}]},{"source":"osv","ecosystem":"npm","package":"@langchain/community","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.1.14"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/langchain__community","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.45-root.io.2"},{"fixed":"0.3.45-root.io.3"},{"fixed":"0.3.45-root.io.4"},{"fixed":"0.3.45-root.io.5"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@langchain/community","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.45-aikido.5"}]}]}],"products":[{"vendor":"langchain","product":"langchain_community"},{"vendor":"langchain-ai","product":"langchainjs"}],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-gf3v-fwqg-4vh7","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/langchain-ai/langchainjs/pull/9990","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/d5e3db0d01ab321ec70a875805b2f74aefdadf9d","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcommunity%401.1.14","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26019","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-gf3v-fwqg-4vh7"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26019.json","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchainjs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-26019","title":"@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation","description":"LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, 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, 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, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.","status":"published","published":"2026-02-11T21:11:10.166Z","modified":"2026-02-12T21:14:41.756Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T13:38:20.971157Z"}],"euvd":[{"id":"EUVD-2026-6211","description":"LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, 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, 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, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.","status":"published","published":"2026-02-11T21:11:10Z","modified":"2026-02-12T21:14:41Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T19:48:39.919829Z"}],"ghsa":[{"id":"GHSA-gf3v-fwqg-4vh7","title":"@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation","description":"## 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.","status":"published","published":"2026-02-11T15:13:20Z","modified":"2026-02-12T14:19:07Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:39:24.742346Z"}],"nvd":[{"id":"CVE-2026-26019","description":"LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, 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, 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, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.","status":"published","published":"2026-02-11T22:15:51.91Z","modified":"2026-06-17T10:25:36.61Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T14:12:05.908608Z"}],"osv":[{"id":"CVE-2026-26019","title":"@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation","description":"LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, 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, 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, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.","status":"published","published":"2026-02-11T21:11:10.166Z","modified":"2026-10-28T02:30:31.927235204Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:44:59.80315Z"},{"id":"GHSA-gf3v-fwqg-4vh7","title":"@langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation","description":"## 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.","status":"published","published":"2026-02-11T15:13:20Z","modified":"2026-09-10T03:50:35.047547727Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-918"],"updated_at":"2026-11-02T15:46:47.822182Z"},{"id":"ROOT-APP-NPM-CVE-2026-26019","title":"CVE-2026-26019 in @rootio/langchain__community - Patched by Root","description":"Root has patched CVE-2026-26019 in the @rootio/langchain__community package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-06-04T13:44:34Z","modified":"2026-06-04T19:00:09.24856005Z","cvss":[{"version":"3.1","score":4.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:53:27.649662Z"}]}}
