LangChain < 0.2.9 SSRF

high Nessus Plugin ID 209518

Synopsis

The remote host contains a machine learning library that is affected by a server side request forgery vulnerability.

Description

The remote host contains a langchain version that is prior to 0.2.9. It is, therefore, affected by a Server-Side Request Forgery vulnerability in the Web Research Retriever component in langchain-community (langchain-community.retrievers.web_research.WebResearchRetriever). 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 0.2.9 or later.

See Also

http://www.nessus.org/u?29002fc4

http://www.nessus.org/u?a991d3d8

http://www.nessus.org/u?48f5c6ed

Plugin Details

Severity: High

ID: 209518

File Name: langchain_0_2_9.nasl

Version: 1.2

Type: local

Published: 10/22/2024

Updated: 10/23/2024

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.2

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

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

Temporal Score: 6.9

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

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:langchain-ai:langchain

Required KB Items: installed_sw/LangChain

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 6/13/2024

Vulnerability Publication Date: 6/6/2024

Reference Information

CVE: CVE-2024-3095

CWE: 918