Skip to main content

Server-Side Request Forgery (SSRF) in @langchain/community

CVE-2026-26019

  • @langchain/community
  • @langchain/core
Severity Medium
Score 4.1/10

Summary

LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, the RecursiveUrlLoader class in "@langchain/community" and "@langchain/core" versions prior to 1.1.21 is a web crawler that recursively follows links from a starting URL. Its "preventOutside" option (enabled by default) is intended to restrict crawling to the same site as the base URL. The implementation used "String.startsWith()" to compare URLs, which does not perform semantic URL validation. An attacker who controls content on a crawled page could include links to domains that share a string prefix with the target, causing the crawler to follow links to attacker-controlled or internal infrastructure. Additionally, the crawler performed no validation against private or reserved IP addresses. A crawled page could include links targeting cloud metadata services, localhost, or RFC 1918 addresses, and the crawler would fetch them without restriction. This vulnerability is fixed in 1.1.14.

  • LOW
  • NETWORK
  • NONE
  • CHANGED
  • REQUIRED
  • LOW
  • LOW
  • NONE

CWE-918 - Server-Side Request Forgery (SSRF)

Server-side request forgery (SSRF) is a weakness that allows an attacker to send an arbitrary request, making it appear that the request was sent by the server. This request may bypass a firewall that would normally prevent direct access to the URL. The impact of this vulnerability can vary from unauthorized access to files and sensitive information to remote code execution.

Advisory Timeline

  • Published