// Security by tool
Security for n8n workflows
Quick answer
n8n became a central piece of AI automation, and it became a target. In 2026 critical RCEs landed in the self-hosted version: CVE-2026-21858 (Ni8mare, CVSS 10.0) allows unauthenticated RCE when an upload form does not validate content type; CVE-2026-25049 (CVSS 9.4) is unauthenticated RCE via a public webhook, injecting JavaScript into a workflow node; and CVE-2026-21877 (10.0) allows code execution by an authenticated user.
What is at stake is severe: n8n stores the credentials (API keys, database passwords, OAuth tokens) of everything it automates. A compromised n8n is not just one machine; it is the key to every system connected to it. Anyone self-hosting needs to update immediately and lock down webhooks and code execution.
Where n8n gets attacked
n8n’s surface is larger than it looks because it executes code (Code nodes, expressions) and receives external triggers (webhooks). Each is a door.
| Vector | CVE / pattern | Impact |
|---|---|---|
| Upload form with no validation | CVE-2026-21858 (Ni8mare, 10.0) | Unauthenticated RCE, file read |
| Public webhook + injection | CVE-2026-25049 (9.4) | Unauthenticated RCE via workflow |
| Code node in legacy mode | CVE-2025-68697 | File read/write in the process |
| Stored credentials | Every n8n by design | The key to all connected systems |
How RET reviews an n8n
RET checks the version against known CVEs, maps which webhooks are public and unauthenticated, and tests whether an external trigger can inject code or read a credential. It checks Code-node isolation and whether n8n is exposed to the internet without need. The focus is blast radius: if it falls, what falls with it?
Since n8n often orchestrates AI agents, RET also reviews the permission boundary (what a workflow can execute) and prompt injection in the AI nodes. Risk Review reads those flows and prioritizes what to lock first.
- Version checked against the 2026 RCEs.
- Public webhooks mapped; none execute code without auth.
- Credentials isolated; the blast radius of a compromise limited.
You may already be exposed if
Signals that call for an urgent review of a self-hosted n8n.
- You run self-hosted n8n and have not updated since 2025.
- You have a public webhook that triggers a workflow with a Code node.
- n8n is reachable from the internet with no VPN or authenticated proxy.
- The credentials of critical systems (database, payments) live inside it.
Want to know whether this happens in your system?
Manual pentest for web applications, APIs and apps, from R$9,500, with the Sprint run within 7 business days. We refund 50% if we find no flaw.
Frequently asked questions
Is n8n cloud (n8n.cloud) also affected?
Some 2026 CVEs (like Ni8mare) were announced affecting self-hosted AND cloud, with the managed version fixed by n8n itself. The biggest exposure risk is in outdated self-hosted, where updating is your responsibility. Check your version against the advisories.
Why is a compromised n8n so severe?
Because it stores the credentials of everything it automates: API keys, database passwords, OAuth tokens. Compromising n8n usually grants access to all connected systems, not just one machine. The blast radius is enormous.
Is updating enough?
Updating closes the known CVEs and is the urgent first step. But also lock down public webhooks, isolate the Code node, take n8n off the open internet and limit what each workflow can execute. RET reviews that whole set.
Who runs the review at RET?
Gabriel Lima Ferreira, founder and lead pentester, with an authorized scope, focusing on blast radius and stored credentials.