CVE-2024-7042

Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection

Published Oct 29, 2024 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading 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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-0088 A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading 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.
Github GHSA Github GHSA GHSA-6m59-8fmv-m5f9 @langchain/community SQL Injection vulnerability
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00077}

epss

{'score': 0.0006}

Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain
CPEs cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*
Vendors & Products Langchain
Langchain langchain
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared Langchain-ai
Langchain-ai langchainjs
CPEs cpe:2.3:a:langchain-ai:langchainjs:*:*:*:*:*:*:*:*
Vendors & Products Langchain-ai
Langchain-ai langchainjs
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading 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.
Title Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
Weaknesses CWE-89
References
Metrics cvssV3_0

{'score': 4.9, 'vector': 'CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Oct 15, 2025, 12:50 PM
Reserved
Jul 23, 2024, 6:41 PM
Status
Analyzed
Published
Oct 29, 2024, 1:15 PM
Modified
Jun 17, 2026, 8:19 AM