LangChain < 0.2.5 SQLi through Prompt Injection

critical Nessus Plugin ID 213563

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 vulnerability in the GraphCypherQAChain class which allows for SQL injection through prompt injection. This vulnerability can lead to 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/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5

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

Plugin Details

Severity: Critical

ID: 213563

File Name: langchain_CVE-2024-8309.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-8309

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