CVE-2026-21877 n8n is vulnerable to Remote Code Execution via Arbitrary File Write
An authenticated attacker can execute arbitrary code via file write in n8n, leading to full system compromise.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-21877?
CVE-2026-21877 is a critical code injection vulnerability in N8n N8n, published on 8 Jan 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
n8n is an open source workflow automation platform. In versions 0.121.2 and below, an authenticated attacker may be able to execute malicious code using the n8n service. This could result in full compromise and can impact both self-hosted and n8n Cloud instances. This issue is fixed in version 1.121.3. Administrators can reduce exposure by disabling the Git node and limiting access for untrusted users, but upgrading to the latest version is recommended.
Which versions are affected by CVE-2026-21877?
2 open source packages ship an affected version, including n8n. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
n8n npm | From 0.123.0 | 1.121.3 |
n8n npm | From 0.123.0 | 1.121.3 |
Products include N8n N8n.
How do I fix CVE-2026-21877?
Upgrade n8n to 1.121.3 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-21877 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-21877 exists.
Public exploit code: 1 Nuclei template and 2 proofs of concept on GitHub.
Other vulnerabilities in N8n N8n
- CVE-2025-68613 n8n Improper Control of Dynamically-Managed Code Resources
- CVE-2026-21858 n8n Vulnerable to Unauthenticated File Access via Improper Webhook Request Handling
- CVE-2026-1470 n8n Unsafe Workflow Expression Evaluation Allows Remote Code Execution
- CVE-2025-68668 n8n Vulnerable to Arbitrary Command Execution in Pyodide based Python Code Node
- CVE-2026-27493 n8n has Unauthenticated Expression Evaluation via Form Node
Sources
Also known as GHSA-v364-rw7m-3263.