LangChain < 0.2.5 DoS

medium Nessus Plugin ID 213567

Synopsis

The remote host is affected by a vulnerability.

Description

The version of LangChain installed on the remote host is prior to 0.2.5. It is, therefore, affected by a Denial-of-Service (DoS) vulnerability in the `SitemapLoader` class. The `parse_sitemap` method, responsible for parsing sitemaps and extracting URLs, lacks a mechanism to prevent infinite recursion when a sitemap URL refers to the current sitemap itself. This oversight allows for the possibility of an infinite loop, leading to a crash by exceeding the maximum recursion depth in Python. This vulnerability can be exploited to occupy server socket/port resources and crash the Python process, impacting the availability of services relying on this functionality.

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.2.5 or later.

See Also

https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae

http://www.nessus.org/u?7fbd4292

Plugin Details

Severity: Medium

ID: 213567

File Name: langchain_CVE-2024-2965.nasl

Version: 1.1

Type: local

Published: 1/8/2025

Updated: 1/8/2025

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 4.4

CVSS v2

Risk Factor: Low

Base Score: 3.8

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

CVSS Score Source: CVE-2024-2965

CVSS v3

Risk Factor: Medium

Base Score: 4.7

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

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-2965