Severity: Critical · Exploitation: No known exploitation · Fix available: Yes
A severe flaw dubbed Ni8mare (CVE-2026-21858) in the n8n workflow automation platform lets an unauthenticated attacker execute arbitrary code and fully compromise affected instances. Deployments exposed to untrusted networks or the public internet face a complete takeover risk. Because n8n often holds API keys, credentials, database connections and enterprise automation logic, a successful exploit has broad consequences for security and data protection. A related flaw, CVE-2026-21877, lets an authenticated user cause untrusted code to run through an arbitrary file write. Fixes are available for both.
CVE-2026-21858 is caused by the way n8n parses certain webhook request content, specifically Content-Type handling in the middleware. Manipulated HTTP headers and request bodies (for example, forcing a Content-Type confusion) let an attacker control internal variables and bypass intended safeguards, so the platform's internal file-handling routines can be misused for arbitrary file access. No authentication is required: a remote attacker only needs to send crafted HTTP requests to n8n webhook endpoints.
CVE-2026-21877 requires an authenticated user. Under certain conditions that user can cause untrusted code to be executed by the n8n service through an arbitrary file write, which can fully compromise the instance. Both self-hosted and n8n Cloud instances are affected.
No in-the-wild exploitation was reported at the time of disclosure. CVE-2026-21858 needs no authentication, so internet-exposed instances should be patched first.
Uptycs vulnerability management identifies hosts, containers and cloud workloads running affected versions so teams can prioritize patching; search for the CVE IDs in the Vulnerabilities Dashboard. Uptycs Threat Research continues to monitor this vulnerability and will update this bulletin if exploitation activity changes.
-- CVE-2026-21858: n8n before 1.121.0
select * from npm_packages where name='n8n' and vercmp(version, '1.121.0') < 0;
-- CVE-2026-21877: n8n after 0.123.0 and before 1.121.3
select * from npm_packages where name='n8n' and vercmp(version, '0.123.0') > 0 and vercmp(version, '1.121.3') < 0;