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

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

- **Severity:** Medium 4.1 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N`)
- **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:** Yes
- **Published:** 25 Feb 2026
- **Updated:** 25 Feb 2026
- **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, MINI-859g-rxw3-vq8p, MINI-gjfc-f949-gjq2, MINI-jmf2-6fqp-8r26, MINI-m2fq-6jw8-2hv9, MINI-q6j2-pcqq-q9cx, ROOT-APP-NPM-CVE-2026-27795

## 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 (Server-Side Request Forgery)

## Which versions are affected by CVE-2026-27795?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@langchain/community` | npm | All versions | 1.1.18 |
| `@langchain/community` | npm | All versions | 1.1.18 |

Products: Langchain Langchain Community.

## How do I fix CVE-2026-27795?

Upgrade @langchain/community to 1.1.18 or later.

## Is CVE-2026-27795 being exploited?

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

## Other vulnerabilities in langchain-ai langchainjs

- [CVE-2026-26019](https://insights.sbomify.com/CVE-2026-26019/): @langchain/community affected by SSRF Bypass in RecursiveUrlLoader via insufficient URL origin validation (medium 4.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27795 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-27795 in the wild and no public exploit code.

Affected packages and fixed versions:
- @langchain/community (npm): affected all versions; fixed in 1.1.18
- @langchain/community (npm): affected all versions; fixed in 1.1.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27795/ (Markdown: https://insights.sbomify.com/CVE-2026-27795/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27795
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27795
- OSV: https://osv.dev/vulnerability/CVE-2026-27795

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27795/
Summaries are generated and may contain mistakes; the official description above is the record.
