Medium

langchain

SSRF Vulnerability

A Server-Side Request Forgery (SSRF) vulnerability was identified in the Web Research Retriever component of the langchain-ai/langchain project, specifically version 0.1.5. This vulnerability allows attackers to perform port scans, access local services, and potentially read instance metadata from cloud environments. The issue was not explicitly stated to be patched in the provided report.

Available publicly on May 02 2024

4.8

CVSS:

CVSS:3.1/AV:P/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N

Credit:

ehtec
Threat Overview

The SSRF vulnerability in the Web Research Retriever arises because it does not restrict requests to external internet addresses, thereby allowing requests to local network addresses. This flaw can be exploited to conduct port scans, access and interact with local services, and potentially read sensitive data from instance metadata in cloud environments. The vulnerability is particularly concerning because it can be exploited by simply redirecting the retriever to attacker-specified local addresses, leveraging the functionality of the Web Explorer interface.

Attack Scenario

An attacker sets up a website with a PHP script designed to redirect requests to a local address if the request originates from the victim's IP. The attacker then ensures this website appears in the search results processed by the Web Research Retriever. When the retriever accesses the attacker's website, it follows the redirect to the local address, thereby unintentionally allowing the attacker to interact with local services or read sensitive data.

Who is affected

Users of the langchain-ai/langchain Web Research Retriever version 0.1.5 are affected by this vulnerability. This includes individuals and organizations using this component to retrieve and process web content. The vulnerability is particularly impactful in environments where the retriever has access to local network services or is deployed in cloud environments with accessible instance metadata.

Technical Report
Want more out of Sightline?

Sightline offers even more for premium customers

Go Premium

We have - related security advisories that are available with Sightline Premium.