CVE-2026-86076: n8n: Expression Sandbox Escape in Editor-UI Enables Stored Cross-User JavaScript Execution

Published Sep 8, 2026
·
Updated

Impact

The expression compiler's sanitizer resolved through a dynamically-scoped this, so a class field named sanitize rebound it and reached the Function constructor. On the backend, any expression author could run code in the n8n process; in the editor preview, a member's expression could run as JavaScript in the session of whoever opened the workflow. The patch rejects reserved class-member names.

Patches

The issue has been fixed in n8n versions 1.123.76, 2.37.7, and 2.38.2. 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: - Restrict n8n instance access to fully trusted users only. - Avoid granting workflow-create or workflow-edit permissions to untrusted users. - Audit existing workflows for unexpected or unfamiliar expressions in node parameters. - Set N8NEXPRESSIONENGINE=vm.

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

Other sources

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.

— NVD

Affected Software

7 affected componentsFixes available
n8n n8n<1.123.76, <=2.37.7, <=2.38.2
npm/n8n>=2.0.0<2.37.7
2.37.7
npm/n8n>=2.38.0<2.38.2
2.38.2
npm/n8n<1.123.76
1.123.76
n8n N8n Node.js<1.123.76
n8n N8n Node.js>=2.0.0<2.37.7
n8n N8n Node.js>=2.38.0<2.38.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/n8n to a version that resolves this vulnerability.

    Fixed in 2.37.7
  2. Upgrade

    Upgrade npm/n8n to a version that resolves this vulnerability.

    Fixed in 2.38.2
  3. Upgrade

    Upgrade npm/n8n to a version that resolves this vulnerability.

    Fixed in 1.123.76
  4. Upgrade

    Upgrade n8n to a version that resolves this vulnerability.

    Fixed in 1.123.76
  5. Upgrade

    Upgrade n8n to a version that resolves this vulnerability.

    Fixed in 2.37.7
  6. Upgrade

    Upgrade n8n to a version that resolves this vulnerability.

    Fixed in 2.38.2
  7. Configuration

    Set N8N_EXPRESSION_ENGINE=vm to use the vm expression engine as a temporary mitigation while upgrading is not immediately possible.

    n8n N8N_EXPRESSION_ENGINE = vm
  8. Compensating control

    Audit existing workflows for unexpected or unfamiliar expressions in node parameters.

  9. Compensating control

    Avoid granting workflow-create or workflow-edit permissions to untrusted users.

  10. Compensating control

    Restrict n8n instance access to fully trusted users only.

Event History

Sep 8, 2026
CVE Published
via MITRE·09:28 PM
Data Sourced
via MITRE·09:28 PM
DescriptionWeakness
Data Sourced
via NVD·10:19 PM
DescriptionSeverityWeaknessAffected Software
Sep 10, 2026
Advisory Published
via GitHub·03:11 PM
Data Sourced
via GitHub·03:11 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203