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

CVE-2026-25055: n8n Vulnerable to Arbitrary File Write on Remote Systems via SSH Node

highCVSS 4.0 7.1GHSA-m82q-59gv-mcr9

The n8n SSH node can write an uploaded file to the wrong place on a remote server. When a workflow takes an uploaded file and sends it over SSH without validating its file name, an unauthenticated attacker can choose the destination path, which can lead to code execution on the remote system. Fixed in n8n 2.4.0 and 1.123.12.

Published Feb 4, 2026 · Analysis Nov 1, 2026

What an attacker can do

The SSH node's upload step joined the file name straight onto the configured remote path and passed it to ssh.putFile. It used fileName or binaryData.fileName as given. A name with directory components, such as path traversal sequences, could therefore escape the target directory. The attacker controls the name through the upload.

The advisory sets two preconditions. A workflow must exist that accepts file uploads through a webhook and sends them with the SSH node. And the upload endpoint must be unauthenticated. The attacker also has to know that such a workflow exists and where its endpoint is.

With those in place, the attacker can write a file anywhere the SSH credentials allow on the remote host, for example a startup script, a cron entry or an authorized_keys file, and that can become remote code execution there. The target is the remote server, not n8n itself, which is why the vector marks a changed scope. The write happens with the privileges of the SSH account stored in n8n.

Who is affected

n8n 2.0.0 up to but not including 2.4.0, and all 1.x versions below 1.123.12. Only workflows that take uploaded files and pass them to the SSH node with a name taken from the upload are exposed. Check the version:

npm ls n8n

Then list workflows that contain both a Webhook node accepting binary data and an SSH node with an upload operation, and note whether the webhook uses authentication.

n8n

Ecosystem
npm
Affected
>= 2.0.0, < 2.4.0
Fixed in
2.4.0
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
< 1.123.12
Fixed in
1.123.12
Check
npm ls n8n

How to fix it

Upgrade to n8n 2.4.0 or 1.123.12, or later. The fix passes the file name through a new sanitizeFilename helper from n8n-workflow, which strips directory components before the remote path is built.

Temporary mitigations from the advisory, which it says do not fully remove the risk:

  • Disable or restrict workflows that accept uploads through webhooks and send them over SSH.
  • Turn on webhook authentication for every upload endpoint.
  • Review the SSH credentials in use and rotate them if in doubt.

The SSH node can also be blocked globally; see the n8n page on blocking nodes.

How to tell if you were hit

On the remote servers, look for files with recent modification times in unexpected places: startup directories, cron paths, home directories and .ssh/authorized_keys, written by the SSH account n8n uses. In n8n execution data, check upload webhooks for file names containing slashes or dot-dot sequences. Review web server logs for unauthenticated POSTs to those webhook paths from unfamiliar addresses. The advisory gives no specific log line.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

When workflows process uploaded files and transfer them to remote servers via the SSH node without validating their metadata the vulnerability can lead to files being written to unintended locations on those remote systems potentially leading to remote code execution on those systems.

As a prerequisites an unauthenticated attacker needs knowledge of such workflows existing and the endpoints for file uploads need to be unauthenticated.

Patches

The issue has been fixed in n8n version 2.4.0 and 1.123.12. Users should upgrade to this version or later to remediate the vulnerability.

Workarounds

If upgrading is not immediately possible, administrators should consider the following temporary mitigations:

  • Disable or restrict access to workflows that accept file uploads via webhooks and transfer them via SSH.
  • Enable webhook authentication on all endpoints that handle file uploads.
  • Review usage of SSH credentials and consider rotating SSH credentials if in doubt.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Resources

---

n8n has adopted CVSS 4.0 as primary score for all security advisories. CVSS 3.1 vector strings are provided for backwards compatibility.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Credited to nkoorty, jjjutla.

Questions

Does CVE-2026-25055 need a login?

Not if the upload webhook is unauthenticated. The attacker only needs to know that a matching workflow exists and where its endpoint is. Authenticating the webhook is a listed mitigation.

Is every n8n instance affected?

No. Only workflows that take uploaded files and send them with the SSH node, using the upload's file name, are exposed.

Where does the code execute?

On the remote system that receives the file over SSH, not on the n8n host. The advisory says the arbitrary write can lead to remote code execution there.

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