CVE-2026-27795: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchainjs
CVE-2026-27795 is a Server-Side Request Forgery (SSRF) vulnerability in langchain-ai's langchainjs framework versions prior to 1. 1. 18. The issue arises in the RecursiveUrlLoader component of the @langchain/community package, where initial URL validation is bypassed due to automatic following of HTTP redirects without revalidation. This allows an attacker to redirect requests from safe public URLs to internal or metadata endpoints, potentially exposing sensitive internal resources. The vulnerability is a bypass of earlier SSRF protections introduced in version 1. 1. 14. The fix in version 1. 1.
AI Analysis
Technical Summary
CVE-2026-27795 is a medium severity SSRF vulnerability affecting langchain-ai's langchainjs framework, specifically the RecursiveUrlLoader in the @langchain/community package versions before 1.1.18. The vulnerability stems from the loader's handling of HTTP redirects: while the initial URL is validated to ensure it points to a safe public resource, the underlying fetch operation automatically follows HTTP 3xx redirects without revalidating the new Location headers. This behavior allows an attacker to craft a URL that initially points to a safe external resource but redirects to internal network addresses or cloud metadata endpoints, bypassing SSRF protections. This can lead to unauthorized internal resource access or information disclosure. The vulnerability is a bypass of protections introduced in version 1.1.14 (CVE-2026-26019). The patch in version 1.1.18 addresses this by disabling automatic redirects (using redirect: "manual"), manually resolving and validating each redirect Location header with validateSafeUrl(), and enforcing a maximum redirect limit to prevent infinite loops. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N) indicates network attack vector, low attack complexity, requiring privileges and user interaction, with scope change and limited confidentiality impact. No known exploits are reported in the wild as of publication. This vulnerability is critical for applications that use langchainjs to fetch external data, especially those deployed in environments with sensitive internal services accessible via HTTP.
Potential Impact
The primary impact of this SSRF vulnerability is unauthorized access to internal or cloud metadata endpoints that are normally inaccessible from the public internet. Attackers exploiting this flaw can potentially retrieve sensitive information such as internal service data, credentials, or configuration details exposed via internal HTTP endpoints. This can lead to further compromise of the affected environment, including lateral movement or privilege escalation. Although the CVSS score indicates a medium severity with limited confidentiality impact, the actual risk depends on the internal network architecture and the sensitivity of accessible endpoints. Organizations running langchainjs in cloud or enterprise environments with internal-only services exposed over HTTP are at higher risk. The vulnerability requires an attacker to have some level of privileges (PR:L) and user interaction (UI:R), which somewhat limits exploitation scope. However, given the increasing adoption of langchainjs for LLM-powered applications, the potential for SSRF to expose internal resources poses a significant security concern, especially in multi-tenant or cloud environments.
Mitigation Recommendations
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.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Japan, South Korea, India, Netherlands
CVE-2026-27795: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchainjs
Description
CVE-2026-27795 is a Server-Side Request Forgery (SSRF) vulnerability in langchain-ai's langchainjs framework versions prior to 1. 1. 18. The issue arises in the RecursiveUrlLoader component of the @langchain/community package, where initial URL validation is bypassed due to automatic following of HTTP redirects without revalidation. This allows an attacker to redirect requests from safe public URLs to internal or metadata endpoints, potentially exposing sensitive internal resources. The vulnerability is a bypass of earlier SSRF protections introduced in version 1. 1. 14. The fix in version 1. 1.
AI-Powered Analysis
Technical Analysis
CVE-2026-27795 is a medium severity SSRF vulnerability affecting langchain-ai's langchainjs framework, specifically the RecursiveUrlLoader in the @langchain/community package versions before 1.1.18. The vulnerability stems from the loader's handling of HTTP redirects: while the initial URL is validated to ensure it points to a safe public resource, the underlying fetch operation automatically follows HTTP 3xx redirects without revalidating the new Location headers. This behavior allows an attacker to craft a URL that initially points to a safe external resource but redirects to internal network addresses or cloud metadata endpoints, bypassing SSRF protections. This can lead to unauthorized internal resource access or information disclosure. The vulnerability is a bypass of protections introduced in version 1.1.14 (CVE-2026-26019). The patch in version 1.1.18 addresses this by disabling automatic redirects (using redirect: "manual"), manually resolving and validating each redirect Location header with validateSafeUrl(), and enforcing a maximum redirect limit to prevent infinite loops. The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N) indicates network attack vector, low attack complexity, requiring privileges and user interaction, with scope change and limited confidentiality impact. No known exploits are reported in the wild as of publication. This vulnerability is critical for applications that use langchainjs to fetch external data, especially those deployed in environments with sensitive internal services accessible via HTTP.
Potential Impact
The primary impact of this SSRF vulnerability is unauthorized access to internal or cloud metadata endpoints that are normally inaccessible from the public internet. Attackers exploiting this flaw can potentially retrieve sensitive information such as internal service data, credentials, or configuration details exposed via internal HTTP endpoints. This can lead to further compromise of the affected environment, including lateral movement or privilege escalation. Although the CVSS score indicates a medium severity with limited confidentiality impact, the actual risk depends on the internal network architecture and the sensitivity of accessible endpoints. Organizations running langchainjs in cloud or enterprise environments with internal-only services exposed over HTTP are at higher risk. The vulnerability requires an attacker to have some level of privileges (PR:L) and user interaction (UI:R), which somewhat limits exploitation scope. However, given the increasing adoption of langchainjs for LLM-powered applications, the potential for SSRF to expose internal resources poses a significant security concern, especially in multi-tenant or cloud environments.
Mitigation Recommendations
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.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-24T02:31:33.265Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 699f6c30b7ef31ef0b560f39
Added to database: 2/25/2026, 9:40:00 PM
Last enriched: 2/26/2026, 4:09:58 AM
Last updated: 2/26/2026, 7:38:10 AM
Views: 2
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.
Related Threats
CVE-2026-25191: Uncontrolled Search Path Element in Digital Arts Inc. FinalCode Ver.5 series
HighCVE-2026-23703: Incorrect default permissions in Digital Arts Inc. FinalCode Ver.5 series
HighCVE-2026-1311: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in bearsthemes Worry Proof Backup
HighFinding Signal in the Noise: Lessons Learned Running a Honeypot with AI Assistance [Guest Diary], (Tue, Feb 24th)
MediumCVE-2026-2506: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in motahar1 EM Cost Calculator
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.