CVE-2024-7042Langchain
Critical 9.8 No auth needed
Follow: this CVE · Langchain · Langchain We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 33
- Auth required
- No
- Published
- Oct 29, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Langchain.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @langchain/community |
< 0.3.3 |
0.3.3 |
npm install @langchain/community@0.3.3 |
Per OSV / GitHub Advisories (GHSA-6m59-8fmv-m5f9). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain | < 0.3.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Exploit Third Party Advisory