CVE-2026-27795 LangChain Community: redirect chaining can lead to SSRF bypass via RecursiveUrlLoader

Medium 4.1 Published Updated

Attackers can bypass SSRF protections in RecursiveUrlLoader by chaining redirects to access internal endpoints, requiring an upgrade to the LangChain community package.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-27795?

CVE-2026-27795 is a medium-severity server-side request forgery vulnerability in langchain-ai langchainjs, published on 25 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

LangChain is a framework for building LLM-powered applications. Prior to version 1.1.8, 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). Users should upgrade to `@langchain/community` 1.1.18, which validates every redirect hop by disabling automatic redirects and re-validating `Location` targets before following them. In this version, automatic redirects are disabled (`redirect: "manual"`), each 3xx `Location` is resolved and validated with `validateSafeUrl()` before the next request, and a maximum redirect limit prevents infinite loops.

Weakness: CWE-918

Which versions are affected by CVE-2026-27795?

2 open source packages ship an affected version, including @langchain/community. It affects 1 product.

PackageAffectedFixed in
@langchain/community npmAll versions1.1.18
@langchain/community npmAll versions1.1.18

Products include Langchain Langchain Community.

How do I fix CVE-2026-27795?

Upgrade @langchain/community to 1.1.18 or later.

Upgrade, and send outbound requests through an allow-list that blocks internal addresses. More about Server-side request forgery.

Is CVE-2026-27795 being exploited?

There is no known exploitation of CVE-2026-27795 in the wild and no public exploit code.

Sources

Also known as CLEANSTART-2026-UF69839, ECHO-70ce-6dbc-a4c4, GHSA-mphv-75cg-56wg, MINI-4g97-4rc3-7rr2, MINI-692w-68m4-hx6w, MINI-846h-gh66-c7v5 and 6 more.

Is CVE-2026-27795 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free