Cyera Research Labs has published details of CVE-2026-21858, nicknamed Ni8mare. The maximum-severity (CVSS 10.0) vulnerability in the n8n workflow automation platform lets an unauthenticated remote attacker gain full administrative control of a self-hosted instance. n8n is widely used to connect AI agents, SaaS APIs and internal systems, so a compromised instance often holds a large number of stored credentials.
What happened
Researcher Dor Attias reported the issue to n8n on 9 November 2025. A fix shipped in version 1.121.0 on 18 November, the CVE was assigned on 6 January 2026, and Cyera published its write-up on 7 January. Cyera estimates around 100,000 servers worldwide are potentially affected. n8n Cloud customers were not affected because managed instances were patched in November.
The disclosure came alongside other critical n8n bugs, including CVE-2025-68613 (CVSS 9.9, authenticated expression injection leading to code execution), CVE-2026-21877 (CVSS 10.0, dangerous file upload) and CVE-2025-68668 “N8scape” (CVSS 9.9, Python Code Node sandbox escape).
Technical details
- The root cause is content-type confusion in how n8n parses incoming requests to form and webhook endpoints.
- An attacker who controls the request’s content type can make the server read arbitrary local files.
- Reading the instance configuration exposes the encryption secret, and reading the SQLite database exposes administrator account data. Together these let an attacker forge an admin session.
- With admin access, an attacker can run code through workflows. Rapid7 notes that a public exploit chains this with CVE-2025-68613.
- Affected range per Rapid7: versions 1.65.0 up to but not including 1.121.0.
Who is affected
The flaw affects organisations running self-hosted n8n with publicly reachable form or webhook endpoints. Censys counted about 26,000 exposed n8n hosts, most of them in the US, Germany and France.
Recommendations
- Upgrade to the latest n8n release. At minimum, 1.121.3 or later addresses Ni8mare and CVE-2026-21877, and 2.0.0 addresses N8scape.
- Do not expose the n8n editor to the internet. Put it behind SSO or a VPN, and require authentication on public forms.
- Restrict or disable public webhook and form endpoints that are not strictly needed.
- On instances that were unpatched and exposed, rotate the n8n encryption key and every credential stored in workflows, including API keys, OAuth tokens and database passwords.
- Review workflow history for unfamiliar workflows or Code nodes.