CSIRTS // UNIFIED SECURITY ADVISORY FEEDSYS ● ONLINE · POWERED BY INTELFUSIONS.COM

GHSA-2pq5-3q89-j7cc: Langroid: Neo4jChatAgent executes LLM-generated Cypher without validation (prompt-to-Cypher injection; config-conditional RCE), mirroring the SQLChatAgent bug fixed in CVE-2026-25879

criticalCVE-2026-55615
Neo4jChatAgent passes LLM-generated Cypher queries straight to the Neo4j driver with no validation, no statement-type allowlist, and no opt-out gate. The query text is influenceable by prompt injection (direct user input or indirect content the agent reads back via RAG), so an attacker who can influence the prompt can read or destroy all graph data and, when APOC or dbms.security procedures are enabled on the server, achieve OS-command and filesystem access. This is the same defect class and threat model as the SQLChatAgent prompt-to-SQL-to-RCE issue fixed in version 0.63.0 (CVE-2026-25879); that fix did not extend to the neo4j module. Technical detail Untrusted-input to sink trace (reviewed on langroid HEAD b9df06f, v0.65.3): 1. Tool schemas accept raw query text from the LLM. langroid/agent/special/neo4j/tools.py:4-9 (CypherRetrievalTool.cypher_query: str) and :15-21 (CypherCreationTool.cypher_query: str). These tools are enabled unconditionally in neo4j_chat_agent.py:412-419 (enable_message([GraphSchemaTool, CypherRetrievalTool, CypherCreationTool, DoneTool])). 2. Read path. neo4j_chat_agent.py:300 cypher_retrieval_tool(msg) -> :325 query = msg.cypher_query -> :328 self.read_query(query) -> :223 session.run(query, parameters). The LLM-controlled string is the first positional argument to session.run; parameters is None. No validation occurs between :325 and :223. 3. Write path. neo4j_chat_agent.py:338 cypher_creation_tool(msg) -> :348 query = msg.cypher_query -> :351 self.write_query(query) -> :276 session.write_transaction(lambda tx: tx.run(query, parameters)). The only inspection of the string (write_query :251-264) is a query.upper() substring test for CREATE/MERGE/CONSTRAINT/INDEX whose sole effect is setting self.config.database_created = True; it blocks nothing. A query such as MATCH (n) DETACH DELETE n (the same statement the built-in remove_database helper runs at :287-293) passes unrestricted. 4. Guarded-sibling contrast proving the incomplete fix.

Details

Source
GitHub Security Advisories (INTL · database · site)
Severity
critical
Published
2026-07-06
Last updated
2026-07-06
Exploitation
Not in CISA KEV at last sync

Original advisory: https://github.com/advisories/GHSA-2pq5-3q89-j7cc

Exploitation outlook

EPSS (FIRST.org) estimates each CVE’s probability of exploitation in the next 30 days — here is the CSIRTS.com read on those numbers.

Referenced CVEs

CVECSIRTS overviewExternal
CVE-2026-55615coverage & exploitation statusNVD · CVE.org

Same CVEs, other sources

How other CERTs, PSIRTs and databases cover the vulnerabilities in this advisory.

More from GitHub Security Advisories