LangChain < 0.2.5 SQLi through Prompt Injection

critical Nessus Plugin ID 213559

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 prompt injection vulnerability in the GraphCypherQAChain class which leads to SQL injection. This vulnerability permits unauthorized data manipulation, data exfiltration, denial of service (DoS) by deleting all data, breaches in multi-tenant security environments, and data integrity issues. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, access data across different tenants, and compromise the integrity of the database.

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/b612defb-1104-4fff-9fef-001ab07c7b2d

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

Plugin Details

Severity: Critical

ID: 213559

File Name: langchain_CVE-2024-7042.nasl

Version: 1.1

Type: local

Published: 1/8/2025

Updated: 1/8/2025

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

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

CVSS Score Source: CVE-2024-7042

CVSS v3

Risk Factor: Critical

Base Score: 9.8

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

Vulnerability Information

CPE: cpe:/a:langchain:langchain

Required KB Items: installed_sw/LangChain

Patch Publication Date: 10/29/2024

Vulnerability Publication Date: 10/29/2024

Reference Information

CVE: CVE-2024-7042

CWE: CWE-89