CVE-2024-7042: Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-7042?
CVE-2024-7042 is considered a critical vulnerability due to its potential for unauthorized data manipulation and SQL injection.
How do I fix CVE-2024-7042?
To fix CVE-2024-7042, upgrade to version 0.3.3 or later of the @langchain/community package.
What software is affected by CVE-2024-7042?
CVE-2024-7042 affects langchain-ai/langchainjs versions prior to 0.3.3 and langchain versions up to 0.3.1.
What type of attack can CVE-2024-7042 lead to?
CVE-2024-7042 can lead to prompt injection which may result in SQL injection attacks.
Can CVE-2024-7042 cause denial of service?
Yes, CVE-2024-7042 allows an attacker to potentially cause denial of service (DoS) through unauthorized actions.