CVE-2026-21877 n8n is vulnerable to Remote Code Execution via Arbitrary File Write

Critical 10.0 Published Updated

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.

Weakness: CWE-94, CWE-434

Which versions are affected by CVE-2026-21877?

2 open source packages ship an affected version, including n8n. It affects 1 product.

PackageAffectedFixed in
n8n npmFrom 0.123.01.121.3
n8n npmFrom 0.123.01.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.

All N8n N8n vulnerabilities

Sources

Also known as GHSA-v364-rw7m-3263.

Is CVE-2026-21877 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free