CVE-2026-27495: n8n has a Sandbox Escape in its JavaScript Task Runner
A user who can create or edit n8n workflows can escape the JavaScript Task Runner sandbox and run code outside it. With the default internal runner this can take over the n8n host. Task Runners must be enabled with N8N_RUNNERS_ENABLED=true. Fixed in n8n 1.123.22, 2.9.3 and 2.10.1.
Published Feb 25, 2026 · Updated Feb 27, 2026 · Analysis Nov 8, 2026
What an attacker can do
n8n runs the JavaScript of Code nodes inside a sandbox in a Task Runner. A flaw in that sandbox lets a workflow author execute arbitrary code beyond the boundary (CWE-94). The advisory gives no technique.
The result depends on the runner mode. With internal runners, the default mode, the escaped code runs with the n8n process and the advisory says the host can be fully compromised. With external runners, the attacker may reach or disturb other tasks that run on the same Task Runner.
The attacker needs a login with the right to create or edit workflows, so this matters most on shared instances where many people or agents author workflows. From the host an attacker can read stored credentials for every connected service, since n8n holds API keys and database logins. The CVSS 4.0 vector also marks high impact on subsequent systems.
Who is affected
npm package n8n, versions before 1.123.22, versions 2.0.0 to below 2.9.3, and 2.10.0. Only instances with Task Runners enabled through N8N_RUNNERS_ENABLED=true are affected. Check the version and the setting:
npm ls -g n8nThen look at the environment of the n8n process for N8N_RUNNERS_ENABLED and N8N_RUNNERS_MODE.
n8n
- Ecosystem
- npm
- Affected
- < 1.123.22
- Fixed in
- 1.123.22
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.0.0, < 2.9.3
- Fixed in
- 2.9.3
- Check
npm ls n8n
n8n
- Ecosystem
- npm
- Affected
- >= 2.10.0, < 2.10.1
- Fixed in
- 2.10.1
- Check
npm ls n8n
How to fix it
Upgrade to n8n 1.123.22, 2.9.3 or 2.10.1, or later.
npm install -g [email protected]The advisory lists two stopgaps that do not fully fix it: allow workflow creation and editing only to fully trusted users, and set N8N_RUNNERS_MODE=external to limit the blast radius.
How to tell if you were hit
Review recently created or changed workflows for Code nodes with unusual JavaScript, such as access to process, require, child processes or the file system. Check the n8n host for unexpected child processes of the n8n or runner process, new files and outbound connections. Check which accounts can edit workflows and what they changed. Beam records agent shell commands and file access, which helps if agents build workflows on this host.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
An authenticated user with permission to create or modify workflows could exploit a vulnerability in the JavaScript Task Runner sandbox to execute arbitrary code outside the sandbox boundary.
On instances using internal Task Runners (default runner mode), this could result in full compromise of the n8n host. On instances using external Task Runners, the attacker might gain access to or impact other task executed on the Task Runner.
- Task Runners must be enabled using
N8N_RUNNERS_ENABLED=true.
Patches
The issue has been fixed in n8n versions 2.10.1, 2.9.3, and 1.123.22. Users should upgrade to one of these versions or later to remediate the vulnerability.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations:
- Limit workflow creation and editing permissions to fully trusted users only.
- Use external runner mode (
N8N_RUNNERS_MODE=external) to limit the blast radius.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Resources
Credited to c0rydoras.
Questions
- Is CVE-2026-27495 exploitable without an n8n account?
No. The attacker needs permission to create or modify workflows. The CVSS 4.0 vector requires low privileges.
- What does external runner mode change?
With external runners the host is not directly exposed, but the attacker may reach other tasks on the runner. The advisory offers it as a way to limit the blast radius.
- Which n8n versions fix CVE-2026-27495?
1.123.22, 2.9.3 and 2.10.1. Upgrade to one of them or later.
- Is CVE-2026-27495 exploited in the wild?
The sources do not say so. The EPSS score in this entry is 0.0084.
References
Read for this analysis:
- https://github.com/n8n-io/n8n/security/advisories/GHSA-jjpj-p2wh-qf23
- https://docs.n8n.io/hosting/configuration/task-runners
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://github.com/n8n-io/n8n/releases/tag/[email protected]
- https://nvd.nist.gov/vuln/detail/CVE-2026-27495
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 entriesCVE-2026-86073
n8n: Per-Resource OAuth Consent Bypass via Unbound Refresh Token Resource Substitution
medium5.9Sep 10, 2026CVE-2026-86074
n8n: Instance AI Credential Setup Accepts Unvalidated Probe URL from Fetched Content
medium5.9Sep 10, 2026CVE-2026-86075
n8n: Unauthenticated Persistent Storage Exhaustion via OAuth Dynamic Client Registration Endpoint
high8.7Sep 10, 2026CVE-2026-86076
n8n: Expression Sandbox Escape via Class-Field Sanitizer Rebinding Can Lead to Code Execution
high8.7Sep 10, 2026CVE-2026-86077
n8n: Anonymous Approval-Gate Bypass via Reused resumeToken over the Chat WebSocket
medium6.3Sep 10, 2026CVE-2026-86078
n8n: Prototype Pollution via Workflow Structure Summary Can Lead to Denial of Service
medium6.0Sep 10, 2026
