CVE-2024-8309CWE-89

SQL Injection in langchain-ai/langchain

Medium 路 published October 29, 2024

CVSS v3.0
4.9
EPSS
14%
Percentile
96.5
In the wild
Unconfirmed
What it is

鈿狅笍 A sneaky SQL injection vulnerability in langchain version 0.2.5 could let attackers manipulate your database like a rogue chef tossing out the whole recipe book! 馃摎 Think of a restaurant where the chef can read the orders but has no quality control on the ingredients. If they mistakenly (or maliciously!) swap out items, it could ruin the entire dish. This is what happens here: attackers can send crafted prompts that trick the system into allowing unauthorized database changes. If exploited, attackers could create, update, or delete crucial data nodes and relationships without any authorization. This means they can access sensitive information, disrupt services, or even wipe the database clean, potentially leading to a denial of service. It's a messy recipe for disaster that could compromise the integrity of your system!

Put simply

Think of a restaurant where the chef can read the orders but has no quality control on the ingredients. If they mistakenly (or maliciously!) swap out items, it could ruin the entire dish. This is what happens here: attackers can send crafted prompts that trick the system into allowing unauthorized database changes. This vulnerability allows for SQL injection via prompt injection in the GraphCypherQAChain class of langchain, permitting unauthorized data manipulation and compromise across multi-tenant environments.

What to do

If exploited, attackers could create, update, or delete crucial data nodes and relationships without any authorization. This means they can access sensitive information, disrupt services, or even wipe the database clean, potentially leading to a denial of service. It's a messy recipe for disaster that could compromise the integrity of your system! To protect your system, update to langchain version 0.2.6 or later to patch this vulnerability. Additionally, review your input validation processes and ensure proper authorization checks are in place to safeguard against prompt injections. It鈥檚 time to lock down your data! You've got this! Follow these steps, and you'll bolster your defenses like a security superhero! 馃Ω

The record
Technical detail
CVSS v3.0
4.9 路 MEDIUM
Vector
CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
CVSS v4.0
Not supplied
EPSS
0.13738 路 96.5th percentile
Weakness
CWE-89 路 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2024-10-29T12:50Z
EPSS history
Timeline
  • 29 OCT 12:50Z
    SQL Injection in langchain-ai/langchain
    cvelistv5