LangChain < 0.1.5 SSRF

high Nessus Plugin ID 213560

Synopsis

The remote host is affected by a vulnerability.

Description

The version of LangChain installed on the remote host is prior to 0.1.5. It is, therefore, affected by a Server-Side Request Forgery (SSRF) vulnerability exists in the Web Research Retriever component of langchain. The vulnerability arises because the Web Research Retriever does not restrict requests to remote internet addresses, allowing it to reach local addresses. This flaw enables attackers to execute port scans, access local services, and in some scenarios, read instance metadata from cloud environments. The vulnerability is particularly concerning as it can be exploited to abuse the Web Explorer server as a proxy for web attacks on third parties and interact with servers in the local network, including reading their response data. This could potentially lead to arbitrary code execution, depending on the nature of the local services. The vulnerability is limited to GET requests, as POST requests are not possible, but the impact on confidentiality, integrity, and availability is significant due to the potential for stolen credentials and state-changing interactions with internal APIs.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to LangChain version 0.1.5 or later.

See Also

https://huntr.com/bounties/e62d4895-2901-405b-9559-38276b6a5273

https://www.cvedetails.com/cve/CVE-2024-3095/

Plugin Details

Severity: High

ID: 213560

File Name: langchain_CVE-2024-3095.nasl

Version: 1.1

Type: local

Published: 1/8/2025

Updated: 1/8/2025

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.2

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Vector: CVSS2#AV:N/AC:L/Au:S/C:C/I:N/A:N

CVSS Score Source: CVE-2024-3095

CVSS v3

Risk Factor: High

Base Score: 7.7

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

Vulnerability Information

CPE: cpe:/a:langchain:langchain

Required KB Items: installed_sw/LangChain

Patch Publication Date: 6/6/2024

Vulnerability Publication Date: 6/6/2024

Reference Information

CVE: CVE-2024-3095

CWE: CWE-918