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

CVE-2026-21858: n8n Vulnerable to Unauthenticated File Access via Improper Webhook Request Handling

criticalCVSS 3.1 10.0GHSA-v4pr-fm98-w9pg

n8n 1.65.0 up to but not including 1.121.0 lets an unauthenticated attacker read files from the server through a public Form workflow, by sending a non-multipart request with a forged `files` field. Researchers showed this leading to a forged admin session and command execution. Upgrade to n8n 1.121.0.

Published Jan 7, 2026 · Updated Jan 13, 2026 · Analysis Nov 1, 2026

What an attacker can do

n8n's webhook middleware chooses a body parser from the Content-Type header. Multipart requests go to a file-upload parser that fills req.body.files. Other types, such as JSON, go to a regular parser that can also set a files key. The Form Webhook node then trusts req.body.files without confirming the request was multipart, so the attacker supplies the file metadata. copyBinaryFile() uses the supplied filepath as its source and copies a local file into the workflow's data. A later node in the workflow can return it to the attacker.

That is an arbitrary file read with no login. Cyera's write-up reads the SQLite database (in Docker /home/node/.n8n/database.sqlite) and the config file with the encryption key. With those, the attacker forges the _n8n-auth session cookie of an admin, then creates a workflow with an Execute Command node to run OS commands as the n8n user. The vector scores CVSS 10.0. A workflow with a public Form trigger is required.

Who is affected

The npm package n8n from 1.65.0 up to 1.121.0 (exclusive). Exposure needs a workflow with a Form trigger reachable by an untrusted caller. Check the version:

npm ls -g n8n

For Docker, check the image tag or run n8n --version in the container. Then list workflows that use the Form trigger and see which ones are public.

n8n

Ecosystem
npm
Affected
>= 1.65.0, < 1.121.0
Fixed in
1.121.0
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.121.0 or later:

npm install -g n8n@latest

The advisory says no official workaround exists. As a temporary measure, restrict or disable public webhook and form endpoints until you upgrade. Cyera's article adds to avoid exposing n8n to the internet unless needed and to require authentication on forms. After upgrading, consider rotating the n8n encryption key and credentials if the instance was exposed, because the key file could have been read.

How to tell if you were hit

Search access logs for requests to Form webhook URLs that have a JSON or other non-multipart Content-Type and a body with a files object. Check for filepath values that point outside n8n's temporary upload directory. Look for new or changed workflows that contain Execute Command nodes, for admin logins or sessions that do not match normal use, and for reads of the .n8n database and config files. Review child processes started by the n8n user.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

A vulnerability in n8n allows an attacker to access files on the underlying server through execution of certain form-based workflows. A vulnerable workflow could grant access to an unauthenticated remote attacker. This could result in exposure of sensitive information stored on the system and may enable further compromise depending on deployment configuration and workflow usage.

Patches

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

Workarounds

No official workarounds are available. As a temporary mitigation, users may restrict or disable publicly accessible webhook and form endpoints until upgrading.

Credited to dorattias.

Questions

Do I need to be logged in to n8n to exploit this?

No. The advisory describes an unauthenticated remote attacker who reaches a vulnerable form-based workflow.

How does a file read become remote code execution?

Per Cyera's write-up, the attacker reads the user database and the config file with the encryption key, forges an admin session cookie, and then builds a workflow with an Execute Command node.

Is it exploited in the wild?

The sources I read do not say it is, and the entry is not in CISA's KEV catalog. A public write-up with the full chain exists, so treat exposed instances as at risk.

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