chore(deps): update dependency @langchain/community to v1.1.18 [security]#626
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency @langchain/community to v1.1.18 [security]#626renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying charites-ai with
|
| Latest commit: |
8f74733
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0b5b075e.charites-ai.pages.dev |
| Branch Preview URL: | https://renovate-npm-langchain-commu.charites-ai.pages.dev |
|
|
550f1b4 to
d96c815
Compare
d96c815 to
07d1aa2
Compare
07d1aa2 to
f9ed3a0
Compare
f9ed3a0 to
dfcfd6f
Compare
dfcfd6f to
8f74733
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.1.5→1.1.18GitHub Vulnerability Alerts
CVE-2026-26019
Description
The
RecursiveUrlLoaderclass in@langchain/communityis a web crawler that recursively follows links from a starting URL. ItspreventOutsideoption (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.compasses astartsWithcheck againsthttps://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:
10.x,172.16.x,192.168.x)This is exploitable in any environment where
RecursiveUrlLoaderruns on infrastructure with access to cloud metadata or internal services — which includes most cloud-hosted deployments.Resolution
Two changes were made:
Origin comparison replaced. The
startsWithcheck 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.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:169.254.169.254,169.254.170.2,100.100.100.200,metadata.google.internal, and related hostnames10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.0/8,169.254.0.0/16::1,fc00::/7,fe80::/10file:,ftp:,javascript:, etc.)Cloud metadata endpoints are unconditionally blocked and cannot be overridden.
Workarounds
Users who cannot upgrade immediately should avoid using
RecursiveUrlLoaderon untrusted or user-influenced content, or should run the crawler in a network environment without access to cloud metadata or internal services.CVE-2026-27795
Summary
A redirect-based Server-Side Request Forgery (SSRF) bypass exists in
RecursiveUrlLoaderin@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
@langchain/communityRecursiveUrlLoaderpreventOutside(default:true) is insufficient to prevent this bypass when redirects are followed automatically.Description
RecursiveUrlLoaderis 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:
10.x,172.16.x,192.168.x)This is exploitable in any environment where
RecursiveUrlLoaderruns with access to internal networks or metadata services, which includes most cloud-hosted deployments.Attack Scenario
Example redirector:
Root Cause
validateSafeUrl) is only performed on the initial URL.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-validatingLocationtargets before following them.redirect: "manual").Locationis resolved and validated withvalidateSafeUrl()before the next request.Reources
Release Notes
langchain-ai/langchainjs (@langchain/community)
v1.1.18Patch Changes
#9900
a9b5059Thanks @hntrl! - fix(core): update method signatures to usePartial<CallOptions>for options parametersUpdated
invoke,stream,generate, andgeneratePromptmethod signatures acrossRunnable,BaseChatModel, andBaseLLMto correctly acceptPartial<CallOptions>instead of fullCallOptions. This aligns the implementation with theRunnableInterfacespecification and allows users to pass partial options (e.g.,{ signal: abortedSignal }) without TypeScript errors.#9900
a9b5059Thanks @hntrl! - Improved abort signal handling for chat models:ModelAbortErrorclass in@langchain/core/errorsthat contains partial output when a model invocation is aborted mid-streaminvoke()now throwsModelAbortErrorwith accumulatedpartialOutputwhen aborted during streaming (when using streaming callback handlers)stream()throws a regularAbortErrorwhen aborted (since chunks are already yielded to the caller)_generate()and_streamResponseChunks()methodsv1.1.16Patch Changes
#9830
70387a1Thanks @bracesproul! - fix: More undefined null errors and tests#9679
a7c6ec5Thanks @christian-bromann! - feat(openai): elevate OpenAI image generation outputs to proper image content blocks#9817
5e04543Thanks @Ashx098! - read error.status when response.status is absent to avoid retrying OpenAI SDK 4xx#9819
40b4467Thanks @MrDockal! - Tool call content returns compacted json#9815
17e30bdThanks @hntrl! - fix(core): respect tracingEnabled=false from RunTree when env tracing is enabledv1.1.15Patch Changes
230462dThanks @christian-bromann! - fix(core): preserve index and timestamp fields in _mergeDictsv1.1.14Patch Changes
#9990
d5e3db0Thanks @hntrl! - feat(core): Add SSRF protection module (@langchain/core/utils/ssrf) with utilities for validating URLs against private IPs, cloud metadata endpoints, and localhost.fix(community): Harden
RecursiveUrlLoaderagainst SSRF attacks by integratingvalidateSafeUrland replacing string-based URL comparison with origin-basedisSameOriginfrom the shared SSRF module.Updated dependencies [
d5e3db0,6939dab,ad581c7]:v1.1.13Patch Changes
#9777
3efe79cThanks @christian-bromann! - fix(core): properly elevate reasoning tokens#9789
b8561c1Thanks @hntrl! - source JsonOutputParser content from text accessorv1.1.12Compare Source
Patch Changes
23be5afThanks @christian-bromann! - fix(@langchain/core): add literal name type inference to tool()v1.1.11Compare Source
Patch Changes
a46a249Thanks @christian-bromann! - fix(core): allow shared object references in serializationv1.1.10Compare Source
Patch Changes
817fc9aThanks @bracesproul! - fix:_mergeDictserror when merging undefined valuesv1.1.9Compare Source
Patch Changes
#9725
56600b9Thanks @Orenoid! - fix(langchain): update merge logic for numeric values inmergeDicts#9736
dc5c2acThanks @hntrl! - fix(core): handle circular references inload#9739
c28d24aThanks @christian-bromann! - fix(core): use getBufferString for message summarization#9702
bfcb87dThanks @christian-bromann! - fix(core): improve interop with Zodv1.1.8Patch Changes
#9707
e5063f9Thanks @hntrl! - add security hardening forload#9684
8996647Thanks @christian-bromann! - fix(core): document purpose of name in base messagev1.1.6Compare Source
Patch Changes
#9835
adb3625Thanks @maahir30! - Use UTF-8 byte length for metadata fieldsUpdated dependencies []:
Configuration
📅 Schedule: Branch creation - "" (UTC), 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.
This PR was generated by Mend Renovate. View the repository job log.