CVE-2026-27795: langchain-ai langchainjs · Server-Side Request Forgery (SSRF)
Affects langchain-ai langchainjsSource CVE Database V5
Mentioned vulnerabilities
Not known to be exploited · CVSS 4.1 Medium : upgrade to 1.1.18 when convenient.
Data as of 30 Oct 2026, 06:59 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 16% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.1.18
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 25 Feb 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade langchainjs and @langchain/community to 1.1.18.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| langchain-ailangchainjs | Affected
| Fixed in
|
npm@langchain/communitypkg:npm/@langchain/communityOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate this vulnerability, organizations should upgrade the @langchain/community package to version 1.1.18 or later, which includes the fix that disables automatic HTTP redirects and enforces validation of each redirect target URL. This ensures that no redirect can bypass the safe URL validation logic. Additionally, developers should audit their use of RecursiveUrlLoader and any other components that perform HTTP fetches with redirects to confirm they do not automatically follow redirects without validation. Implement network-level controls such as firewall rules or egress filtering to restrict outbound HTTP requests from application servers to only approved external endpoints, preventing SSRF exploitation from reaching internal services. Monitoring and logging HTTP requests and redirects can help detect suspicious redirect chains indicative of SSRF attempts. Finally, applying the principle of least privilege to the application environment and isolating sensitive internal services can reduce the impact if SSRF is exploited.
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.
References
- github.com/langchain-ai/langchainjs/security/advisories/GHSA-mphv-75cg-56wg (opens in a new tab)
- github.com/langchain-ai/langchainjs/security/advisories/GHSA-gf3v-fwqg-4vh7 (opens in a new tab)
- github.com/langchain-ai/langchainjs/pull/9990 (opens in a new tab)
- github.com/langchain-ai/langchainjs/commit/2812d2b2b9fd9343c4850e2ab906b8cf440975ee (opens in a new tab)
- github.com/langchain-ai/langchainjs/commit/d5e3db0d01ab321ec70a875805b2f74aefdadf9d (opens in a new tab)
- github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcommunity%401.1.14 (opens in a new tab)
- github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcommunity%401.1.18 (opens in a new tab)