CVE-2024-8309
Python vulnerability analysis and mitigation

Overview

A vulnerability (CVE-2024-8309) was discovered in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 that allows for SQL injection through prompt injection. The vulnerability was disclosed on October 29, 2024, and affects the langchain package version 0.2.5 (NVD).

Technical details

The vulnerability exists in the GraphCypherQAChain class and allows attackers to perform SQL injection attacks through prompt injection. The issue has received a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, indicating a critical severity level with network access vector and no required privileges or user interaction (NVD).

Impact

The vulnerability can lead to multiple severe impacts including: 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).

Mitigation and workarounds

A patch has been released to address this vulnerability. Users should upgrade to a patched version of the software. The fix is available in the langchain repository (Github Patch).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-9mv7-3c64-mmqwHIGH8.7
  • PythonPython
  • xml2rfc
NoYesSep 10, 2025
GHSA-f7qq-56ww-84crHIGH8.3
  • PythonPython
  • picklescan
NoYesSep 10, 2025
GHSA-jgw4-cr84-mqxgHIGH7.8
  • PythonPython
  • picklescan
NoYesSep 10, 2025
GHSA-mjqp-26hc-grxgHIGH7.5
  • PythonPython
  • picklescan
NoYesSep 10, 2025
CVE-2025-59035MEDIUM4.6
  • PythonPython
  • indico
NoYesSep 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management