
Ni8mare and N8scape flaws among multiple critical vulnerabilities affecting n8n
Rapid7's ETR write-up on "Ni8mare," an exploit chain against n8n automation software anchored by CVE-2026-21858 (CVSS 10.0), an unauthenticated file read flaw triggered by improper content-type validation on custom webhook file-upload forms that lets an attacker overwrite internal JSON to read arbitrary files and forge admin session tokens. That access can be chained with four authenticated CVEs — CVE-2025-68613 (expression language injection RCE), CVE-2025-68668 (Pyodide Python node command execution), CVE-2025-68697 (legacy Code node file read/write), and CVE-2026-21877 (arbitrary file write RCE, CVSS 9.9) — for full remote code execution. Cyera and researcher Valentin Lobstein published separate technical analyses and PoCs on the same day; Rapid7 lists affected version ranges for each CVE and recommends upgrading self-hosted n8n to 1.121.0+.
What it is
Five CVEs affecting n8n automation software, anchored by CVE-2026-21858 ("Ni8mare," CVSS 10.0), an unauthenticated arbitrary file read. The patch shipped November 18, 2025; the advisory was published January 7, 2026. The summary names all five CVEs and their mechanisms — what it omits is the per-CVE affected version ranges and one operational nuance about which authenticated bug is realistic to chain.
Preconditions / Affected
Per-CVE version boundaries (vendor-stated), which the summary does not carry:
- CVE-2026-21858 (unauth file read, CVSS 10.0): ≥1.65.0 and <1.121.0. Requires a custom web form that implements file uploads without content-type validation.
- CVE-2025-68613 (expression injection RCE): ≥0.211.0 and <1.20.4.
- CVE-2025-68668 (Pyodide Python node command exec): ≥1.0.0 and <2.0.0.
- CVE-2025-68697 (legacy Code node file read/write): ≥1.2.1 and <2.0.0.
- CVE-2026-21877 (arbitrary file write RCE, CVSS 9.9): ≥0.123.0 and <1.121.3 — affects both self-hosted and cloud n8n.
Note the ranges do not all overlap: CVE-2025-68613's ceiling (<1.20.4) sits below CVE-2026-21858's floor (≥1.65.0), so the specific chain each bug enables depends on the target's exact version.
What to do
Upgrade self-hosted n8n to ≥1.121.0 to close the unauthenticated initial-access vector (CVE-2026-21858). Rapid7 Exposure Command, InsightVM, and Nexpose customers have vulnerability checks for all five CVEs in the January 9, 2026 content release.
Caveats
- CVE-2025-68697 is the least practical link in the chain. It only applies when the Code node runs in legacy (non-task-runner) JavaScript mode, and since n8n ≥1.2.1 blocks read/write to the
.n8ndirectory by default, Rapid7 assesses that exploiting it as a chained secondary bug would require a bespoke per-target strategy — making it unlikely versus the other authenticated CVEs. - Only two exploits were public as of writing: Cyera's writeup demonstrates CVE-2026-21858 alone; Valentin Lobstein's PoC additionally chains CVE-2025-68613 for RCE. The other three authenticated CVEs are described as chainable but no PoC is cited.
Organisations named here
- Cyera
- Ni8mare
- Valentin Lobstein
CVEs named here
- CVE-2026-21858
- CVE-2025-68613
- CVE-2025-68668
- CVE-2025-68697
- CVE-2026-21877
Technologies named here
- n8n
- Exposure Command
- InsightVM
- Nexpose
Techniques named here
- Expression language injection
- File read/write via legacy Code node execution mode
- RCE via arbitrary file write
- Vulnerability chaining
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
