CVE-2026-85165: n8n before 2.36.2 Expression Sandbox Bypass via SpreadElement
n8n versions before 2.36.2 contain an expression sandbox bypass vulnerability where free identifiers in spread, computed-key, switch-case, or class-extension positions resolve against process globals. Authenticated users with workflow-edit permission can mutate host objects through expression evaluation, with changes persisting process-wide until restart.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.36.2 - Compensating control
Because the mutated host object changes persist process-wide until restart, restart the n8n process after applying the upgrade to clear any process-global mutations from exploitation.
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated n8n user must have permission to edit workflows. The issue is therefore most relevant where workflow-edit access is granted to untrusted or insufficiently trusted users.
What access or interaction does exploitation require?
Exploitation requires evaluating a crafted expression in a workflow. No unauthenticated attack path is described in the available data.
What is the impact if exploitation succeeds?
A user can mutate host objects through expression evaluation. Those changes persist process-wide until the n8n process is restarted.
Which versions are affected, and what is the remediation?
n8n versions before 2.36.2 are affected. Upgrade to version 2.36.2 or later.
What can be done if an upgrade cannot happen immediately?
Restrict workflow-edit permission to trusted users, since that permission is required for exploitation. Restarting the n8n process clears process-wide changes that have already persisted, but does not remove the underlying vulnerability.