n8n Authenticated RCE via Arbitrary File Write
CVE-2026-21877 is a critical vulnerability in n8n, the open source workflow automation platform, that allows an authenticated attacker to cause untrusted code to be executed by the n8n service. The issue is described by the vendor and multiple supporting sources as an authenticated remote code execution path via arbitrary file write, with some reporting characterizing it as an unrestricted upload of a file with a dangerous type. Affected versions are n8n >= 0.123.0 and < 1.121.3, impacting both self-hosted deployments and n8n Cloud. Successful exploitation can lead to full compromise of the affected instance.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository is a minimal malicious n8n custom node package consisting of two files: package.json and dist/Rce.node.js. The package metadata registers dist/Rce.node.js as an n8n node and describes it as a lab package for reproducing CVE-2026-21877 in n8n 1.121.2. The actual exploit logic is not in the node's execute() method; instead, it runs immediately at module load time via child_process.exec(). That command launches a Unix reverse shell using mkfifo, /bin/sh, and nc, connecting to 0.tcp.ap.ngrok.io on TCP port 16113. This means simply importing/loading the node is sufficient to trigger code execution. Structurally, the exported Rce class mostly serves as a benign-looking wrapper with n8n node metadata, while the top-level exec() call is the malicious capability. The exploit is therefore an operational malicious package/plugin intended to achieve remote shell access through supply-chain style loading of a custom node in an n8n/Node.js environment.
This repository is a self-contained lab and exploit for an n8n-to-Flask command injection chain labeled as CVE-2026-21877. The main exploit file, `CVE-2026-21877_exploit.py`, is a Python interactive shell client that sends POST requests to an n8n webhook on port 5678. It supports both test mode (`/webhook-test/renad-secure-gate`) and production mode (`/webhook/renad-secure-gate`), and injects attacker-controlled shell commands by placing `; <cmd>` into the JSON `address` field. The repository structure shows the full vulnerable environment rather than just a standalone exploit. `network_monitor.py` is the actual vulnerable Flask service: it accepts a `target` parameter and executes `ping -c 2 {target}` using `subprocess.check_output(..., shell=True)`, making it trivially vulnerable to command injection. `n8n_workflow_cve.json` defines the n8n workflow that exposes the webhook path `renad-secure-gate`, forwards the incoming `address` value as `target` to `http://net-monitor:5000/`, and returns the backend response. `docker-compose.yml` orchestrates both the `n8n-renad` container and the `net-monitor` container, exposing ports 5678 and 5000. The `Dockerfile` builds the vulnerable Flask container and places a demonstration flag at `/root/flag.txt`. Exploit capability is remote command execution against the backend service reachable through the n8n webhook. The exploit attempts to extract command output from HTML `<pre>` tags in the response and provides an interactive prompt for repeated command execution. This is not a detection script; it is a working exploit for a deliberately vulnerable lab setup. The payload is basic and hardcoded, so the maturity is best classified as OPERATIONAL rather than weaponized.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
66 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
n8n authenticated RCE vulnerability (CVSS 10.0).
Maximum-severity n8n vulnerability enabling an authenticated attacker to achieve remote code execution (RCE).
Authenticated remote code execution path in n8n (reported as critical).
A code-injection vulnerability in n8n that can allow a remote privileged attacker to execute arbitrary code; can be chained with CVE-2026-21858 for code execution or arbitrary file writes on some versions.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.