Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

n8n Authenticated RCE via Arbitrary File Write

IdentifiersCVE-2026-21877CWE-434· Unrestricted Upload of File with…

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.

Share:
For your environment

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.

ANALYST BRIEF

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.

Successful exploitation allows authenticated remote code execution in the context of the n8n service and can result in full compromise of the affected instance. Because n8n commonly has access to workflows, credentials, internal systems, and sensitive data, compromise may expose stored secrets, enable workflow tampering, facilitate lateral movement into connected environments, and provide broad control over automation infrastructure.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by disabling the Git node and limiting access for untrusted users. Additional hardening measures supported by the content include restricting workflow modification privileges to trusted or top-level administrators, blocking high-risk nodes where feasible, and reviewing audit logs and recent workflow changes for suspicious activity until the upgrade can be completed.

Remediation

Patch, then assume compromise.

Upgrade n8n to version 1.121.3 or later. The vulnerability is fixed in 1.121.3. Organizations should prioritize patching both self-hosted and cloud-hosted affected deployments running versions >= 0.123.0 and < 1.121.3.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 2 / 3 TOTALView more in app
cve-2026-21877-rceMaturityPoCFrameworkotherVerified exploit

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.

monkeontheroofDisclosed Apr 26, 2026javascriptjsonlocalnetworksupply_chain
CVE-2026-21877MaturityPoCVerified exploit

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.

CVEs-LabsDisclosed Apr 22, 2026pythonjsonwebnetwork
EXPOSURE SURFACE

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.

VendorProductType
N8nN8napplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity47

Community discussion across Reddit, Mastodon, and other social sources.