All @langchain/community versions
@langchain/community @0.0.43
Third-party integrations for LangChain.js
Maintainers
Dependencies (7)
| Package | Constraint | Registry Status |
|---|---|---|
| zod | ^3.22.3 | auto_approved |
| flat | ^5.0.2 | auto_approved |
| uuid | ^9.0.0 | auto_approved |
| expr-eval | ^2.0.2 | rejected |
| langsmith | ~0.1.1 | auto_approved |
| @langchain/core | ~0.1.44 | auto_approved |
| @langchain/openai | ~0.0.19 | auto_approved |
Dev Dependencies (129)
| Package | Constraint | Registry Status |
|---|---|---|
| pg | ^8.11.0 | auto_approved |
| dpdm | ^3.12.0 | Not imported |
| dria | ^0.0.3 | Not imported |
| jest | ^29.5.0 | auto_approved |
| cborg | ^4.1.1 | auto_approved |
| jsdom | ^22.1.0 | auto_approved |
| redis | ^4.6.6 | auto_approved |
| convex | ^1.3.1 | auto_approved |
| dotenv | ^16.0.3 | auto_approved |
| eslint | ^8.33.0 | auto_approved |
| it-all | ^3.0.4 | auto_approved |
| lodash | ^4.17.21 | auto_approved |
| lunary | ^0.6.11 | Not imported |
| mysql2 | ^3.3.3 | auto_approved |
| rollup | ^3.19.1 | rejected |
| graphql | ^16.6.0 | auto_approved |
| ioredis | ^5.3.2 | auto_approved |
| mongodb | ^5.2.0 | auto_approved |
| ts-jest | ^29.1.0 | auto_approved |
| typeorm | ^0.3.12 | auto_approved |
| usearch | ^1.1.1 | needs_review |
| chromadb | ^1.5.3 | auto_approved |
| prettier | ^2.8.3 | auto_approved |
| vectordb | ^0.1.4 | pending |
| @swc/core | ^1.3.90 | auto_approved |
| @swc/jest | ^0.2.29 | auto_approved |
| @types/pg | ^8.11.0 | pending |
| @types/ws | ^8 | auto_approved |
| cohere-ai | >=6.0.0 | auto_approved |
| couchbase | ^4.3.0 | auto_approved |
| llmonitor | ^0.5.9 | Not imported |
| replicate | ^0.18.0 | pending |
| typesense | ^1.5.3 | pending |
| @vercel/kv | ^0.2.3 | pending |
| discord.js | ^14.14.1 | auto_approved |
| faiss-node | ^0.5.1 | pending |
| googleapis | ^126.0.1 | pending |
| portkey-ai | ^0.1.11 | Not imported |
| release-it | ^15.10.1 | pending |
| typescript | ~5.1.6 | auto_approved |
| voy-search | 0.6.2 | Not imported |
| @types/flat | ^5.0.2 | pending |
| @types/uuid | ^9 | pending |
| @raycast/api | ^1.55.2 | auto_approved |
| @types/jsdom | ^21.1.1 | auto_approved |
| hnswlib-node | ^1.4.2 | auto_approved |
| html-to-text | ^9.0.5 | auto_approved |
| jsonwebtoken | ^9.0.2 | auto_approved |
| neo4j-driver | ^5.17.0 | auto_approved |
| pickleparser | ^0.2.1 | Not imported |
| @jest/globals | ^29.5.0 | auto_approved |
| @types/lodash | ^4 | auto_approved |
| @aws-sdk/types | ^3.357.0 | auto_approved |
| @cloudflare/ai | ^1.0.12 | Not imported |
| @getzep/zep-js | ^0.9.0 | Not imported |
| @gomomento/sdk | ^1.51.1 | Not imported |
| @upstash/redis | ^1.20.6 | auto_approved |
| better-sqlite3 | ^9.4.0 | auto_approved |
| datastore-core | ^9.2.9 | auto_approved |
| firebase-admin | ^11.9.0 || ^12.0.0 | auto_approved |
| node-llama-cpp | 2.7.3 | auto_approved |
| @faker-js/faker | ^7.6.0 | pending |
| @rockset/client | ^0.9.1 | auto_approved |
| @upstash/vector | ^1.0.2 | auto_approved |
| @xata.io/client | ^0.28.0 | Not imported |
| closevector-web | 0.1.6 | Not imported |
| pg-copy-streams | ^6.0.5 | pending |
| @premai/prem-sdk | ^0.3.25 | Not imported |
| @vercel/postgres | ^0.5.0 | pending |
| cassandra-driver | ^4.7.2 | auto_approved |
| closevector-node | 0.1.6 | Not imported |
| web-auth-library | ^1.0.3 | pending |
| @smithy/util-utf8 | ^2.0.0 | auto_approved |
| @clickhouse/client | ^0.2.5 | pending |
| @langchain/scripts | ~0.0 | Not imported |
| closevector-common | 0.1.3 | Not imported |
| eslint-plugin-jest | ^27.6.0 | pending |
| weaviate-ts-client | ^1.4.0 | auto_approved |
| @aws-sdk/client-sfn | ^3.362.0 | auto_approved |
| @getmetal/metal-sdk | ^4.0.0 | Not imported |
| @gomomento/sdk-core | ^1.51.1 | Not imported |
| @types/html-to-text | ^9 | auto_approved |
| @types/jsonwebtoken | ^9 | auto_approved |
| google-auth-library | ^8.9.0 | auto_approved |
| interface-datastore | ^8.2.11 | pending |
| @mozilla/readability | ^0.4.4 | auto_approved |
| @smithy/signature-v4 | ^2.0.10 | auto_approved |
| @writerai/writer-sdk | ^0.40.2 | Not imported |
| @xenova/transformers | ^2.5.4 | auto_approved |
| eslint-plugin-import | ^2.27.5 | auto_approved |
| @aws-crypto/sha256-js | ^5.0.0 | auto_approved |
| @datastax/astra-db-ts | ^0.1.4 | pending |
| @planetscale/database | ^1.8.0 | auto_approved |
| @smithy/protocol-http | ^3.0.6 | auto_approved |
| @supabase/supabase-js | ^2.10.0 | auto_approved |
| @tensorflow/tfjs-core | ^3.6.0 | pending |
| @tsconfig/recommended | ^1.0.2 | auto_approved |
| @types/better-sqlite3 | ^7.6.9 | pending |
| jest-environment-node | ^29.6.4 | auto_approved |
| @aws-sdk/client-kendra | ^3.352.0 | auto_approved |
| @aws-sdk/client-lambda | ^3.310.0 | auto_approved |
| @elastic/elasticsearch | ^8.4.0 | pending |
| @gradientai/nodejs-sdk | ^1.2.0 | Not imported |
| @huggingface/inference | ^2.6.4 | pending |
| @qdrant/js-client-rest | ^1.2.0 | auto_approved |
| @supabase/postgrest-js | ^1.1.1 | pending |
| @types/pg-copy-streams | ^1.2.2 | Not imported |
| eslint-config-prettier | ^8.6.0 | auto_approved |
| eslint-plugin-prettier | ^4.2.1 | auto_approved |
| @azure/search-documents | ^12.0.0 | pending |
| @aws-sdk/client-dynamodb | ^3.310.0 | auto_approved |
| @zilliz/milvus2-sdk-node | >=2.2.11 | auto_approved |
| @cloudflare/workers-types | ^4.20230922.0 | auto_approved |
| @smithy/eventstream-codec | ^2.0.5 | auto_approved |
| @typescript-eslint/parser | ^5.58.0 | auto_approved |
| eslint-config-airbnb-base | ^15.0.0 | auto_approved |
| @tensorflow/tfjs-converter | ^3.6.0 | auto_approved |
| @types/mozilla-readability | ^0.2.1 | Not imported |
| @pinecone-database/pinecone | ^1.1.0 | pending |
| eslint-plugin-no-instanceof | ^1.0.1 | Not imported |
| @tensorflow/tfjs-backend-cpu | ^3 | pending |
| @google-ai/generativelanguage | ^0.2.1 | pending |
| @opensearch-project/opensearch | ^2.2.0 | auto_approved |
| @aws-sdk/client-bedrock-runtime | ^3.422.0 | auto_approved |
| @typescript-eslint/eslint-plugin | ^5.58.0 | auto_approved |
| @aws-sdk/client-sagemaker-runtime | ^3.414.0 | auto_approved |
| @aws-sdk/credential-provider-node | ^3.388.0 | auto_approved |
| @aws-sdk/client-bedrock-agent-runtime | ^3.496.0 | auto_approved |
| @tensorflow-models/universal-sentence-encoder | ^1.3.3 | pending |
Transitive Dependency Tree
Risk Dispositions (2 applicable to this version, 0 other)
Accepted rules are downgraded to INFO on future analyses; rejected rules escalate to CRITICAL.
| Rule | Source | Disposition | Author | Reason | |
|---|---|---|---|---|---|
osv:GHSA-gf3v-fwqg-4vh7 |
osv | reject | AI | AI (osv): SSRF vulnerability in RecursiveUrlLoader affects all versions < 1.1.14; verdict generalizes to any version in the affected range. | |
osv:GHSA-mphv-75cg-56wg |
osv | reject | AI | AI (osv): Redirect-chaining SSRF bypass in RecursiveUrlLoader affects all versions < 1.1.18; verdict generalizes to any version in the affected range. |
SAST Findings (4)
[Always reject] CVSS 4.1 (MEDIUM) — CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N ## 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.
[Always reject] CVSS 4.1 (MEDIUM) — CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N ## Summary A redirect-based Server-Side Request Forgery (SSRF) bypass exists in `RecursiveUrlLoader` in `@langchain/community`. The loader validates the initial URL but allows the underlying fetch to follow redirects automatically, which permits a transition from a safe public URL to an internal or metadata endpoint without revalidation. This is a bypass of the SSRF protections introduced in 1.1.14 (CVE-2026-26019). ## Affected Component - Package: `@langchain/community` - Component: `RecursiveUrlLoader` - Configuration: `preventOutside` (default: `true`) is insufficient to prevent this bypass when redirects are followed automatically. ## Description `RecursiveUrlLoader` is a web crawler that recursively follows links from a starting URL. The existing SSRF mitigation validates the initial URL before fetching, but it does not re-validate when the request follows redirects. Because fetch follows redirects by default, an attacker can supply a public URL that passes validation and then redirects to a private network address, localhost, or cloud metadata endpoint. This constitutes a “check‑then‑act” gap in the request lifecycle: the safety check occurs before the redirect chain is resolved, and the final destination is never validated. ## Impact If an attacker can influence content on a page being crawled (e.g., user‑generated content, untrusted external pages), they can cause the crawler to: - Fetch cloud instance metadata (AWS, GCP, Azure), potentially exposing credentials or tokens - Access internal services on private networks (`10.x`, `172.16.x`, `192.168.x`) - Connect to localhost services - Exfiltrate response data through attacker-controlled redirect chains This is exploitable in any environment where `RecursiveUrlLoader` runs with access to internal networks or metadata services, which includes most cloud-hosted deployments. ## Attack Scenario 1. The crawler is pointed at a public URL that passes initial SSRF validation. 2. That URL responds with a 3xx redirect to an internal target. 3. The fetch follows the redirect automatically without revalidation. 4. The crawler accesses the internal or metadata endpoint. Example redirector: ``` https://302.r3dir.me/--to/?url=http://169.254.169.254/latest/meta-data/ ``` ## Root Cause - SSRF validation (`validateSafeUrl`) is only performed on the initial URL. - Redirects are followed automatically by fetch (`redirect: "follow"` default), so the request can change destinations without additional validation. ## Resolution Upgrade to `@langchain/community` **>= 1.1.18**, which validates every redirect hop by disabling automatic redirects and re-validating `Location` targets before following them. - Automatic redirects are disabled (`redirect: "manual"`). - Each 3xx `Location` is resolved and validated with `validateSafeUrl()` before the next request. - A maximum redirect limit prevents infinite loops. ## Reources - Original SSRF fix (CVE-2026-26019): enforced origin comparison and added initial URL validation - https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-gf3v-fwqg-4vh7
CVSS 4.9 (MEDIUM) — CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading to SQL injection. This vulnerability permits unauthorized data manipulation, data exfiltration, denial of service (DoS) by deleting all data, breaches in multi-tenant security environments, and data integrity issues. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, access data across different tenants, and compromise the integrity of the database.
Package was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.
Review Summary
Risk score: 93. Findings: 2 critical (+80), 1 medium (+10), 1 low (+3), 64 info (+0).
Commit: ef6e2b366b09 Browse source
Published to npm: