CVE-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 p
Properties
- ghsa_id
- GHSA-2pq5-3q89-j7cc
- severity
- critical
- summary
- Langroid: Neo4jChatAgent executes LLM-generated Cypher without validation (prompt-to-Cypher injection; config-conditional RCE), mirroring the SQLChatAgent bug fixed in CVE-2026-25879
- epss_score
- 0.00383
- cve_id
- CVE-2026-55615
- is_ghsa_only
- false
- ghsa_published
- 2026-07-06T21:22:43Z
- source_url
- https://github.com/advisories/GHSA-2pq5-3q89-j7cc
- epss_percentile
- 0.31692
- ghsa_updated
- 2026-07-06T21:22:44Z
Related Entities (5)
ENRICHED_BY (1)
HAS_WEAKNESS (1)
REPORTED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
Explore deeper with Ninja Signal's threat intelligence graph