NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

CVE-2026-21877: n8n Vulnerable to RCE via Arbitrary File Write

criticalCVSS 3.1 9.9GHSA-v364-rw7m-3263

n8n 0.123.0 up to but not including 1.121.3 has an authenticated remote code execution flaw, tracked as an arbitrary file write, that can fully compromise the instance. Both self-hosted and n8n Cloud were affected. Upgrade to n8n 1.121.3. The advisory's workaround is to disable the Git node.

Published Jan 6, 2026 · Analysis Nov 1, 2026

What an attacker can do

The advisory says that under certain conditions an authenticated user can make the n8n service execute untrusted code. The title and the CWE-434 label point to a file write that leads to code execution. The advisory does not describe the exact conditions or the write primitive, and its workaround, which is disabling the Git node, suggests the path runs through that node.

The attacker must have an n8n account that can create or edit workflows. That includes any editor on a shared instance, or someone who obtained credentials. Code then runs as the n8n process. The CVSS 3.1 score is 9.9 with changed scope: the n8n host holds stored credentials for connected services, the encryption key and the workflow data, so a compromise reaches beyond n8n itself. On a team instance where several people or contractors can build workflows, a single low-trust account is enough.

Who is affected

The npm package n8n from 0.123.0 up to 1.121.3 (exclusive). The advisory says both self-hosted and n8n Cloud instances were affected. Check your self-hosted version:

npm ls -g n8n

For Docker, read the image tag or run n8n --version in the container. Then review who holds accounts that can create or edit workflows.

n8n

Ecosystem
npm
Affected
>= 0.123.0, < 1.121.3
Fixed in
1.121.3
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.121.3 or later:

npm install -g n8n@latest

If you cannot upgrade right away, the advisory says to disable the Git node and limit access for untrusted users. n8n documents how to block nodes under "Blocking access to nodes" in its hosting and security docs. After a suspected compromise, rotate the credentials stored in n8n and the instance encryption key.

How to tell if you were hit

Review workflows for use of the Git node, especially new or recently edited ones from accounts that should not need it. Check the n8n data directory and the host for files created or changed outside normal paths around workflow runs. Look at child processes started by the n8n user and at outbound connections the instance does not usually make. Audit recent logins and workflow changes by non-admin users.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

n8n is affected by an authenticated Remote Code Execution (RCE) vulnerability.

Under certain conditions, an authenticated user may be able to cause untrusted code to be executed by the n8n service. This could result in full compromise of the affected instance.

Both self-hosted and n8n Cloud instances are impacted.

Patches

The issue has been resolved in n8n version 1.121.3.

Users are advised to upgrade to this version or later to fully address the vulnerability.

Workarounds

If upgrading is not immediately possible, administrators can reduce exposure by disabling the Git node and limiting access for untrusted users.

References

Credited to theolelasseux.

Questions

Do I need an account to exploit this?

Yes. The advisory describes an authenticated user. On instances where many people can edit workflows, that is a low bar.

Is n8n Cloud affected?

The advisory says both self-hosted and n8n Cloud instances were impacted.

What is the workaround if I cannot upgrade?

Disable the Git node and limit access for untrusted users. n8n documents node blocking in its hosting docs.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries