Skip to content

fix(deps): update dependency @langchain/community to v1 [security] - #4059

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-langchain-community-vulnerability
Open

fix(deps): update dependency @langchain/community to v1 [security]#4059
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-langchain-community-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@langchain/community (source) 0.3.571.1.18 age confidence

@​langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation

CVE-2026-26019 / GHSA-gf3v-fwqg-4vh7

More information

Details

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.

Severity

  • CVSS Score: 4.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


LangChain Community: redirect chaining can lead to SSRF bypass via RecursiveUrlLoader

CVE-2026-27795 / GHSA-mphv-75cg-56wg

More information

Details

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

Severity

  • CVSS Score: 4.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

langchain-ai/langchainjs-community (@​langchain/community)

v0.3.58

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner February 15, 2026 11:17
@renovate
renovate Bot requested review from NoritakaIkeda and sasamuku and removed request for a team February 15, 2026 11:17
@giselles-ai

giselles-ai Bot commented Feb 15, 2026

Copy link
Copy Markdown

Finished running flow.

Step 1
🟢
On Pull Request OpenedStatus: Success Updated: Feb 15, 2026 11:17am
Step 2
🟢
gpt-5Status: Success Updated: Feb 15, 2026 11:18am
Step 3
🟢
Create Pull Request CommentStatus: Success Updated: Feb 15, 2026 11:18am

@vercel

vercel Bot commented Feb 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
liam-app Ready Ready Preview Aug 14, 2026 10:16pm
liam-assets Ready Ready Preview Aug 14, 2026 10:16pm
liam-docs Ready Ready Preview Aug 14, 2026 10:16pm
liam-erd-sample Ready Ready Preview Aug 14, 2026 10:16pm
liam-storybook Ready Ready Preview Aug 14, 2026 10:16pm

Request Review

@giselles-ai

giselles-ai Bot commented Feb 15, 2026

Copy link
Copy Markdown

Check changeset necessity

Status: NOT REQUIRED

Reason:

  • Only the internal package "@liam-hq/agent" was modified (dependency bump of @langchain/community); this package is explicitly listed in the ignored packages.
  • No changes to target, published packages: "@liam-hq/cli", "@liam-hq/erd-core", "@liam-hq/schema", or "@liam-hq/ui".
  • Changes are dependency updates and lockfile adjustments, with no user-facing API/behavior changes in the target packages.
  • Workspace config (pnpm-workspace.yaml) was updated to allow a Renovate security release; this is tooling/configuration, not user-facing.

Changeset (copy & paste):

N/A

@github-actions

github-actions Bot commented Feb 15, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent Deep Modeling Execution

Started at: 2026-08-14 22:16:33 UTC

View Details

Command Output

@liam-hq/agent@0.1.0 execute-deep-modeling /home/runner/work/liam/liam/frontend/internal-packages/agent
pnpm test:integration src/createGraph.integration.test.ts

@liam-hq/agent@0.1.0 test:integration /home/runner/work/liam/liam/frontend/internal-packages/agent
vitest --watch=false --passWithNoTests --config vitest.config.integration.ts src/createGraph.integration.test.ts

RUN v3.2.4 /home/runner/work/liam/liam/frontend/internal-packages/agent

(node:7913) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)

✅ [INFO] 2026-08-14T22:16:36.647Z
LangSmith Trace URL: https://smith.langchain.com/o/eed4d2d8-0bd8-4ca4-a452-4da88ef63fd6/projects/p/9324fe51-27a4-4604-a52b-c6cc240f6dcc?searchModel=%7B%22filter%22%3A%22and(eq(is_root%2C%20true)%2C%20and(eq(metadata_key%2C%20%5C%22thread_id%5C%22)%2C%20eq(metadata_value%2C%20%5C%225ce61965-9a97-458e-b919-1f9c41461297%5C%22)))%22%7D
stderr | src/createGraph.integration.test.ts > createGraph Integration > should execute complete workflow
Failed to Failed to send multipart request. Received status [403]: Forbidden. Message:

Context: trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=34869435-ffa1-4716-b3c2-f6a959f7dbe7; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=468cbef9-c86b-41d1-8e9b-20b0ce5604c0; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=52747f3e-43d3-411e-a6df-b43c37932c0f; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=96c153d7-fd80-4f58-8be4-75ce4d500f61; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=f3ed8903-4fd0-4c0a-951a-f8d26ee2628b; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=4e05b1d7-c35f-4d23-8f73-41651bb14424; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=1fb40324-9794-491a-ab2b-a0907814e72f; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=ff95786f-92cf-4f96-bd28-21117fb62765; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=5f4fed0f-f817-492d-a0cf-cfd0965143da; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=08d839b8-95fa-4dfd-b9be-afadb460ff0b; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=b07a7b7d-1505-44be-82ea-d54a4892a2e4; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=bdb79032-273a-459e-92ad-8e24fb44ea20; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=5f27e4ae-fc8e-4127-ad37-d8ec4ff88f7a; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=6b60d9c6-edb9-45b7-93ae-c74190e45478; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=39479c91-6dfa-4cb6-be9f-734698ac5d66; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=db2dc0c5-5b71-48e9-94d7-84fbcaa700bf; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=e9391b77-c204-4a07-8283-751099136c43; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=1388618f-2c65-4f84-a820-67fde242200e; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=c205b5fe-f582-446e-a9d0-5d7f22095cc6; trace=34869435-ffa1-4716-b3c2-f6a959f7dbe7,id=5d27dc9a-6de1-498e-ac61-bd227f2b4549

x

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

FAIL src/createGraph.integration.test.ts > createGraph Integration > should execute complete workflow
WorkflowTerminationError: Error in analyzeRequirementsNode: 401 Incorrect API key provided: sk-proj-********************************************************************************************************************************************************N7kA. You can find your API key at https://platform.openai.com/account/api-keys.

Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MODEL_AUTHENTICATION/

❯ RunnableCallable.analyzeRequirementsNode [as func] src/pm-agent/nodes/analyzeRequirementsNode.ts:38:11
36|
37| if (analysisResult.isErr()) {
38| throw new WorkflowTerminationError(
| ^
39| analysisResult.error,
40| 'analyzeRequirementsNode',
❯ RunnableCallable.invoke ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9_@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/utils.ts:85:21
❯ RunnableSequence.invoke ../../../node_modules/.pnpm/@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@2.2.0_@op_699d387bf3cd2e241eef1c879c74d8a1/node_modules/@langchain/core/dist/runnables/base.js:1308:33
runWithRetry ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/pregel/retry.ts:103:16
❯ PregelRunner.executeTasksWithRetry ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/pregel/runner.ts:330:27
❯ PregelRunner.tick ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9_@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/pregel/runner.ts:138:50
❯ CompiledStateGraph.runLoop ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/pregel/index.ts:2233:9
❯ createAndRunLoop ../../../node_modules/.pnpm/@langchain+langgraph@0.4.9_@langchain+core@0.3.78_@opentelemetry+api@1.9.0_@opentelemet_f6b5be0720daebd638bdb35b510ff2bf/node_modules/@langchain/langgraph/src/pregel/index.ts:2092:9

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Test Files 1 failed (1)
Tests 1 failed (1)
Start at 22:16:34
Duration 2.38s (transform 499ms, setup 0ms, collect 1.51s, tests 590ms, environment 0ms, prepare 86ms)

 ELIFECYCLE  Command failed with exit code 1.
/home/runner/work/liam/liam/frontend/internal-packages/agent:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @liam-hq/agent@0.1.0 execute-deep-modeling: pnpm test:integration src/createGraph.integration.test.ts
Exit status 1

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

},
"dependencies": {
"@langchain/community": "0.3.57",
"@langchain/community": "1.1.14",

@devin-ai-integration devin-ai-integration Bot Feb 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Peer dependency mismatch: @langchain/community@1.1.18 requires @langchain/core@^1.1.27 but project uses @langchain/core@0.3.78

@langchain/community was upgraded from 0.3.57 (v0.x) to 1.1.18 (v1.x), but its companion dependency @langchain/core was left at 0.3.78. The lockfile confirms @langchain/community@1.1.18 declares a peer dependency of @langchain/core: ^1.1.27, which 0.3.78 does not satisfy. Furthermore, @langchain/community@1.1.18 internally pulls in @langchain/openai@1.2.9 (which also requires @langchain/core@^1.1.27) and @langchain/classic@1.0.19 (which requires @langchain/core@^1.0.0), all incompatible with the installed 0.3.78. While pnpm resolves this at install time (using autoInstallPeers), mixing @langchain/core@0.3.x with libraries designed for @langchain/core@1.x will likely cause runtime failures due to API incompatibilities (e.g., changed class interfaces, removed methods, or different type contracts between the 0.x and 1.x lines). The project's own @langchain/openai@0.6.9 (which requires @langchain/core >=0.3.68 <0.4.0) is also now in conflict with the @langchain/openai@1.2.9 transitively brought in by @langchain/community@1.1.18.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from ece87b7 to 80a1e4c Compare February 17, 2026 22:00
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from 80a1e4c to 403577e Compare March 1, 2026 19:15
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from 403577e to daa1818 Compare March 14, 2026 21:04
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from fb5e9b8 to ca1eb86 Compare May 12, 2026 10:57
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from ca1eb86 to c61ec61 Compare May 18, 2026 17:21
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from c61ec61 to 376519f Compare May 28, 2026 17:44
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from 376519f to ec8c7e8 Compare June 1, 2026 22:08
@renovate
renovate Bot force-pushed the renovate/npm-langchain-community-vulnerability branch from ec8c7e8 to 36244db Compare June 11, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants