CVE-2026-26019: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchainjs
LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, the RecursiveUrlLoader class in @langchain/community 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.
AI Analysis
Technical Summary
LangChain is a framework designed for building applications powered by large language models (LLMs). Within langchainjs, the RecursiveUrlLoader class functions as a web crawler that recursively follows hyperlinks starting from a given URL. To prevent the crawler from traversing outside the intended domain, the preventOutside option is enabled by default. However, the implementation of this restriction relies on a simplistic string prefix check using String.startsWith(), which does not perform proper semantic URL validation. This allows an attacker who can control content on a page being crawled to insert links that share a string prefix with the target domain but actually resolve to different domains, including attacker-controlled domains or internal infrastructure. Moreover, the crawler lacks validation against private IP ranges, localhost addresses, and cloud metadata service endpoints. Consequently, the crawler may inadvertently fetch sensitive internal resources such as cloud instance metadata or internal network services. This SSRF vulnerability could be exploited to access internal resources, leak sensitive information, or facilitate further attacks within an organization's network. The vulnerability affects all langchainjs versions prior to 1.1.14 and was assigned CVE-2026-26019 with a CVSS v3.1 score of 4.1, indicating medium severity. Exploitation requires low privileges and user interaction, and the scope is limited to applications using the vulnerable RecursiveUrlLoader with the preventOutside option enabled. The issue has been resolved in version 1.1.14 by improving URL validation and restricting access to private IP ranges.
Potential Impact
Organizations using langchainjs versions prior to 1.1.14 that employ the RecursiveUrlLoader with the preventOutside option enabled are at risk of SSRF attacks. An attacker able to inject or control content on a crawled page can manipulate the crawler to access unintended external or internal resources. This can lead to unauthorized access to internal services, including cloud metadata endpoints that may expose credentials or configuration data. While the CVSS score is medium, the impact on confidentiality can be significant if sensitive internal resources are exposed. Integrity and availability impacts are minimal as the vulnerability primarily enables information disclosure. The exploitation requires some user interaction and low privileges, limiting the attack surface. However, organizations relying on langchainjs for web crawling or data ingestion should consider this a serious risk, especially if deployed in environments with sensitive internal infrastructure or cloud services. The lack of known exploits in the wild reduces immediate risk but does not preclude future exploitation attempts.
Mitigation Recommendations
Upgrade langchainjs to version 1.1.14 or later, where the vulnerability is fixed with proper semantic URL validation and restrictions on private IP addresses. If upgrading is not immediately possible, implement strict network-level controls to prevent the application from accessing internal IP ranges, localhost addresses, and cloud metadata service endpoints. Employ web application firewalls (WAFs) or proxy filtering to block suspicious outbound requests initiated by the crawler. Review and sanitize all content that the crawler processes to minimize the risk of attacker-controlled links. Additionally, configure the crawler to disable or limit recursive crawling where feasible, and monitor logs for unusual outbound requests to internal or unexpected destinations. Conduct regular security assessments on applications using langchainjs to detect potential SSRF exploitation attempts.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, Japan, South Korea, France, Netherlands, India
CVE-2026-26019: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchainjs
Description
LangChain is a framework for building LLM-powered applications. Prior to 1.1.14, the RecursiveUrlLoader class in @langchain/community 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
LangChain is a framework designed for building applications powered by large language models (LLMs). Within langchainjs, the RecursiveUrlLoader class functions as a web crawler that recursively follows hyperlinks starting from a given URL. To prevent the crawler from traversing outside the intended domain, the preventOutside option is enabled by default. However, the implementation of this restriction relies on a simplistic string prefix check using String.startsWith(), which does not perform proper semantic URL validation. This allows an attacker who can control content on a page being crawled to insert links that share a string prefix with the target domain but actually resolve to different domains, including attacker-controlled domains or internal infrastructure. Moreover, the crawler lacks validation against private IP ranges, localhost addresses, and cloud metadata service endpoints. Consequently, the crawler may inadvertently fetch sensitive internal resources such as cloud instance metadata or internal network services. This SSRF vulnerability could be exploited to access internal resources, leak sensitive information, or facilitate further attacks within an organization's network. The vulnerability affects all langchainjs versions prior to 1.1.14 and was assigned CVE-2026-26019 with a CVSS v3.1 score of 4.1, indicating medium severity. Exploitation requires low privileges and user interaction, and the scope is limited to applications using the vulnerable RecursiveUrlLoader with the preventOutside option enabled. The issue has been resolved in version 1.1.14 by improving URL validation and restricting access to private IP ranges.
Potential Impact
Organizations using langchainjs versions prior to 1.1.14 that employ the RecursiveUrlLoader with the preventOutside option enabled are at risk of SSRF attacks. An attacker able to inject or control content on a crawled page can manipulate the crawler to access unintended external or internal resources. This can lead to unauthorized access to internal services, including cloud metadata endpoints that may expose credentials or configuration data. While the CVSS score is medium, the impact on confidentiality can be significant if sensitive internal resources are exposed. Integrity and availability impacts are minimal as the vulnerability primarily enables information disclosure. The exploitation requires some user interaction and low privileges, limiting the attack surface. However, organizations relying on langchainjs for web crawling or data ingestion should consider this a serious risk, especially if deployed in environments with sensitive internal infrastructure or cloud services. The lack of known exploits in the wild reduces immediate risk but does not preclude future exploitation attempts.
Mitigation Recommendations
Upgrade langchainjs to version 1.1.14 or later, where the vulnerability is fixed with proper semantic URL validation and restrictions on private IP addresses. If upgrading is not immediately possible, implement strict network-level controls to prevent the application from accessing internal IP ranges, localhost addresses, and cloud metadata service endpoints. Employ web application firewalls (WAFs) or proxy filtering to block suspicious outbound requests initiated by the crawler. Review and sanitize all content that the crawler processes to minimize the risk of attacker-controlled links. Additionally, configure the crawler to disable or limit recursive crawling where feasible, and monitor logs for unusual outbound requests to internal or unexpected destinations. Conduct regular security assessments on applications using langchainjs to detect potential SSRF exploitation attempts.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-09T21:36:29.554Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 698cf5244b57a58fa1cd824c
Added to database: 2/11/2026, 9:31:16 PM
Last enriched: 2/19/2026, 1:57:48 PM
Last updated: 3/29/2026, 12:26:06 AM
Views: 170
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.