CVE-2024-7042
published medium CVSS 3.0 · 4.9Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
Package status and fixes
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.0
- Base score
- 4.9 / 10
- Severity
- medium
- Provider
- @huntr_ai · cna
- Vector string
- CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain-ai/langchainjs | unspecified to < 0.3.1 (affected · custom) | @huntr_ai · cna |
| langchain-ai | langchainjs | 0 to < 0.3.1 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-89 CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
2Provider assertions
2@huntr_ai · cna
Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 97c49384df94e3ebe1f93c4edae41c165e442bc84e8c75feca5495ca04d64802
- Ingested
- 23 Sep 2026, 08:33:35 UTC
- Source record
- Official CVE record