CVE-2024-7042: Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection

Published Oct 29, 2024
·
Updated

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

2 affected componentsFixes available
npm/@langchain/community<0.3.3
0.3.3
Langchain Langchain<0.3.1

Event History

Oct 29, 2024
CVE Published
via MITRE·12:50 PM
Data Sourced
via MITRE·12:50 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:32 PM

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203