CVE-2026-27795: SSRF Bypass in @langchain/community's RecursiveUrlLoader

@langchain/community Updated 26 Feb 2026

Summary

25/02/2026
Yes i
Moderate
4.1

CVE-2026-27795: LangChain Community: redirect chaining can lead to SSRF bypass via RecursiveUrlLoader. Affects @langchain/community versions < 1.1.18. Fixed in 1.1.18. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @langchain/community package is a library designed for building applications that utilize language models. It includes various components for web crawling and data fetching, one of which is the RecursiveUrlLoader. This component is intended to follow links from a starting URL recursively. However, it has a vulnerability that allows attackers to exploit redirect chains, leading to potential Server-Side Request Forgery (SSRF) attacks.

Vulnerability Detail

A redirect-based Server-Side Request Forgery (SSRF) bypass exists in the RecursiveUrlLoader component of the @langchain/community package. The loader initially validates the URL but fails to revalidate during automatic redirects. This oversight allows attackers to redirect from a safe public URL to internal or sensitive endpoints, potentially exposing credentials or accessing private network services. The vulnerability stems from a 'check-then-act' gap in the request lifecycle, where safety checks are only performed on the initial URL, leaving subsequent redirects unvalidated.

How To Fix

Minimum fixed version

1.1.18

This is the first release that contains the fix.

npm install @langchain/community@1.1.18

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can disable automatic redirects in your fetch requests by setting the redirect option to 'manual'. This will require you to handle redirects manually and validate each location before proceeding.

Conclusion

The CVE-2026-27795 vulnerability in the @langchain/community package's RecursiveUrlLoader poses a significant risk due to its SSRF bypass capabilities. It is crucial to upgrade to the patched version to mitigate potential threats and ensure the security of applications utilizing this package.

See every vulnerability recorded for @langchain/community →

Share this vulnerability

FAQ

Server-Side Request Forgery (SSRF) is a vulnerability that allows an attacker to send crafted requests from a vulnerable server to internal or external resources, potentially leading to unauthorized access to sensitive data.

An attacker can exploit this vulnerability by providing a public URL that redirects to an internal service or metadata endpoint, allowing them to access sensitive information.

The impacts include unauthorized access to cloud instance metadata, internal services on private networks, and the ability to exfiltrate data through controlled redirects.

Yes, upgrading to version 1.1.18 or higher of the @langchain/community package addresses this vulnerability.

You can use Vulert, which monitors open-source vulnerabilities in your software. By analyzing your package-lock.json file, it can alert you to any vulnerabilities, including this one. You can also check your application using the Vulert playground without signing up.

Related vulnerabilities

Recent vulnerabilities recorded for @langchain/community.

How To Fix

Minimum fixed version

1.1.18

This is the first release that contains the fix.

npm install @langchain/community@1.1.18

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback