Skip to main content
VulnerabilityPublished

CVE-2026-27795: langchain-ai langchainjs · Server-Side Request Forgery (SSRF)

Affects langchain-ai langchainjsSource CVE Database V5

0
Compare

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

CVSS 3.1 base score
4.1Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 25 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
langchain-ailangchainjsAffected
  • <1.1.18
Fixed in
  • 1.1.18
npm@langchain/communitypkg:npm/@langchain/communityOther threatsAffected
  • <1.1.18
Fixed in
  • 1.1.18

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

Community reviews

Loading reviews…