INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2026-26019

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

CVE-2026-26019 · 2026-02-11 moderate

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Server-side request forgery
Affected
@langchain/community (npm)
Gets past
SSRF protection
CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
EPSS
0.4% chance of exploitation in 30 days

How it works, in short

Crawled pages can link to hosts whose names merely start with the base domain or to private and metadata addresses, which the crawler fetches without validation. (Our summary, written by a model. The source text is below.)

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:

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:

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.