Vulnerability · Published Oct 29, 2024 · Assigned by @huntr_ai

CVE-2024-8309SQL Injection in langchain-ai/langchain

Medium 4.9

In plain English

A medium-severity SQL injection in langchain-ai/langchain from langchain-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 13.7% (higher than 97% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)4.9Medium
Exploit odds (30 days)13.7%top 3.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official description

A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlangchain0.2.0GHSA-45pg-36p6-83v9
PyPIlangchain0.2.0PYSEC-2024-115
PyPIlangchain0.2.0PYSEC-2026-1507
PyPIlangchain-community0.2.19GHSA-45pg-36p6-83v9
PyPIlangchain-community0.3.0PYSEC-2024-115

Affected products (as reported)

VendorProductVersions
langchain-ai langchain-ai/langchain unspecified – before 0.3.0

Weakness: CWE-89 · Vector: CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

References