4.9medium
Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
- Severity
- 4.9medium CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 0.31% (higher than 25% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- @huntr_ai
- Also known as
- GHSA-6m59-8fmv-m5f9
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| langchain-ai langchain-ai/langchainjs | from unspecified before 0.3.1 | CVE List |
| langchain-ai langchainjs | before 0.3.1 | CVE List |
| @langchain/community (npm) | before 0.3.3 | GitHub Advisory Database |
| langchain langchain | before 0.3.1 | NVD |
All scores
| @huntr_ai | 4.9medium CVSS:3.0 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 4.9low CVSS:3.0 | CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Una vulnerabilidad en la clase GraphCypherQAChain de langchain-ai/langchainjs versiones 0.2.5 y todas las versiones con esta clase permite la inyección rápida, lo que lleva a la inyección SQL. Esta vulnerabilidad permite la manipulación no autorizada de datos, la exfiltración de datos, la denegación de servicio (DoS) mediante la eliminación de todos los datos, las infracciones en entornos de seguridad de múltiples tenants y los problemas de integridad de los datos. Los atacantes pueden crear, actualizar o eliminar nodos y relaciones sin la autorización adecuada, extraer datos confidenciales, interrumpir servicios, acceder a datos en diferentes tenants y comprometer la integridad de la base de datos.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-7042 changed 2025-10-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6m59-8fmv-m5f9 changed 2026-08-07 | CC-BY-4.0 |
| NVD | CVE-2024-7042 changed 2026-06-17 | Public domain |