Security brief

Historical advisory: prompt injection could manipulate LangChain graph queries

REVIEW

GraphCypherQAChain connects model output to database operations; permissions matter alongside dependency updates.

Published 29 Oct 2026 · Material update 7 Jul 2026 — last time the underlying evidence changed · Evidence: high

What happened

OSV’s CVE-2024-8309 record describes prompt injection in GraphCypherQAChain that could lead to unauthorized graph-data access or modification. Its listed consequences include data extraction, destructive queries, and disruption.

The record covers langchain and langchain-community with separate affected ranges. Do not apply one package’s version number to the other; consult the current package tables for the installation being assessed.

The design lesson is that a generated query inherits the permissions of its execution account. For an older deployment, update affected dependencies and review whether the connection can perform operations beyond the application’s intended use. That review should include tenant boundaries where several customers share infrastructure.

Read the original source.

Who should check?

Teams running GraphCypherQAChain against sensitive or shared graph databases.

Next step

Compare both installed packages with the advisory and restrict database privileges.

What we know

Affected component
GraphCypherQAChain

What remains unknown

Open question
The sources reviewed do not establish whether your deployment was exploited.

Source references

Technical details

CVE
CVE-2024-8309