# CVE-2024-8309: SQL Injection in langchain-ai/langchain

> CVE-2024-8309: SQL Injection in langchain-ai/langchain. CVSS 4.9 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2024-8309
Last updated: 2026-06-17T08:22:20Z

- Published: 2024-10-29 12:50 UTC · Updated: 2026-06-17 08:22 UTC · Assigner: @huntr\_ai
- CVSS: 4.9 (CVSS 3.1) · Severity: Medium · Vector: CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- EPSS: 13.7%, 96th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-89

## Description

A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through prompt injection. This vulnerability can lead to 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 vendors and products

- langchain-ai: langchain
- langchain-ai: langchain-ai/langchain

## Tracked companies

- [LangChain (LangSmith)](https://rewindex.com/company/langchain-langsmith.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2024-8309)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2024-8309)
- [https://github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255](https://github.com/langchain-ai/langchain/commit/c2a3021bb0c5f54649d380b42a0684ca5778c255)
- [https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5](https://huntr.com/bounties/8f4ad910-7fdc-4089-8f0a-b5df5f32e7c5)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2024-8309 · Markdown: https://rewindex.com/cve/CVE-2024-8309.md · JSON: https://rewindex.com/api/v1/cves/CVE-2024-8309 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:14:35.349Z
