CVE-2026-86076: n8n: Expression Sandbox Escape in Editor-UI Enables Stored Cross-User JavaScript Execution
n8n is an open source workflow automation platform. Prior to 1.123.76, 2.37.7, and 2.38.2, the expression compiler sanitizer resolved through dynamically scoped this and did not reject reserved class member names. A class field named sanitize could rebind the sanitizer and reach the Function constructor, enabling backend code execution and editor-preview JavaScript execution. The affected AST hook is PrototypeSanitizer in packages/workflow/src/expression-sandboxing.ts. This issue is fixed in versions 1.123.76, 2.37.7 and 2.38.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 1.123.76 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.37.7 - Upgrade
Upgrade
n8nto a version that resolves this vulnerability.Fixed in 2.38.2 - Compensating control
Apply compensating controls for stored cross-user JavaScript execution in the editor UI (e.g., restrict editor access/permissions to trusted users) while upgrading, since the affected AST hook is PrototypeSanitizer in packages/workflow/src/expression-sandboxing.ts.
Event History
Frequently Asked Questions
Which n8n versions need to be updated?
Versions earlier than 1.123.76, 2.37.7, and 2.38.2 are affected. Upgrade to the applicable fixed version for your release line.
What capabilities could exploitation provide?
A crafted expression can escape the expression compiler sanitizer by rebinding it through a class field named __sanitize and reaching the Function constructor. This can enable backend code execution and JavaScript execution in editor previews for other users.
What component should be reviewed when assessing exposure?
The affected sanitizer hook is PrototypeSanitizer in packages/workflow/src/expression-sandboxing.ts. Environments using the vulnerable expression compiler behavior should be considered exposed until updated.