CVE-2026-86076

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

Published Sep 8, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability is a sandbox escape that allows a malicious user to define a special class field named __sanitize inside a workflow expression. Because the sanitizer did not reject reserved class member names and was invoked with a dynamically scoped this, an attacker could rebind the sanitizer to the Function constructor, causing arbitrary JavaScript code to be executed on the server and in the editor preview. This effectively grants the attacker full code execution on machines running n8n, enabling data exfiltration, privilege escalation, and service disruption.

Affected Systems

n8n, the open source workflow automation platform by n8n‑io. All installations of n8n with a version older than 1.123.76, 2.37.7, or 2.38.2 are vulnerable. The flaw resides in the expression compiler module in packages/workflow/src/expression-sandboxing.ts.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. Though no EPSS score is presently available and the issue is not listed in the CISA KEV catalog, the description suggests the likely attack vector involves exploitation through the web UI by an authenticated user capable of creating or editing expressions. Because the flaw is deep in the backend sanitizer, an attacker would need some level of authenticated access or privileged user rights to inject the malicious class field. The potential for remote code execution means any compromise could lead to full system compromise, warranting prompt mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest official patch by installing n8n v1.123.76, v2.37.7, or v2.38.2.
  • Restrict workflow editing privileges to authorized users through role‑based access control to limit the ability to inject malicious expressions.
  • If an update is not immediately possible, disable or limit the expression sandbox functionality to block dynamic class field injection, noting that no official workaround has been provided.

Generated by OpenCVE AI on September 9, 2026 at 08:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-hw8v-xxg5-vvvx n8n: Expression Sandbox Escape via Class-Field Sanitizer Rebinding Can Lead to Code Execution
History
Type Values Removed Values Added
First Time appeared N8n
N8n n8n
CPEs cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*
Vendors & Products N8n
N8n n8n
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title n8n: Expression Sandbox Escape in Editor-UI Enables Stored Cross-User JavaScript Execution
Weaknesses CWE-94
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:N'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 9, 2026, 3:33 PM
Reserved
Sep 4, 2026, 7:34 PM
Status
Analyzed
Published
Sep 8, 2026, 10:19 PM
Modified
Sep 11, 2026, 6:20 PM