n8n Expression Sandbox Bypass Vulnerability (CVE-2026-85165) — Critical Severity

A severe security flaw has been discovered in n8n, a popular workflow automation platform. This vulnerability, identified as CVE-2026-85165, could allow unauthorized manipulation of the system. It impacts certain older versions of n8n and carries a critical severity rating, emphasizing the urgent need for users to take action.

At its core, the problem lies within n8n’s expression sandbox. This sandbox is designed to safely run code snippets, preventing them from accessing sensitive parts of the system. However, a bypass was found where specific code patterns (like those using spread elements, computed-keys, switch-case, or class extensions) could escape this isolation. This escape allowed authenticated users with workflow editing permissions to access and modify critical internal objects of the n8n process. What makes this particularly dangerous is that any changes made would stick around, affecting all subsequent operations across the n8n instance until it was restarted.

CVE Details

Product: n8n

Published Date: September 03, 2026

Severity: CRITICAL

Status: Analyzed

Affected Products

This critical vulnerability impacts n8n versions prior to 2.36.2. Specifically, if you are running any n8n version older than 2.36.2 or 2.35.4, your system is at risk. It’s important to check your current n8n installation to determine if you are using one of these vulnerable versions.

Current Status

The vulnerability has been thoroughly analyzed and confirmed. Patches are available, and users are strongly advised to update their installations. The security community and n8n developers are aware of the issue and have provided solutions to mitigate the risk.

Severity Level

The n8n Expression Sandbox Bypass vulnerability is rated as CRITICAL with a CVSS score of 9.9. This high score indicates that the vulnerability is easy to exploit and can lead to significant consequences, including high impact on integrity and availability of the affected system. An attacker with low privileges could achieve substantial control over the n8n environment, potentially disrupting operations or compromising sensitive data. This severity demands immediate attention.

Possible Solutions

The most effective way to address this vulnerability is to update your n8n installation immediately. The issue has been officially resolved in versions 2.35.4 and 2.36.2. Users should upgrade to either of these versions or any later release to ensure their systems are protected.

If an immediate upgrade isn’t feasible, there are temporary workarounds, though they do not fully eliminate the risk and should only be used as short-term measures:

  • Restrict Access: Limit access to your n8n instance to only fully trusted users. This reduces the pool of potential attackers who could exploit the workflow-edit permission.
  • Regular Restarts: For self-hosted deployments, periodically restarting the n8n process can help clear any malicious modifications that might have accumulated. However, this is a reactive measure and doesn’t prevent initial exploitation.

Always prioritize applying the official patches as soon as possible for comprehensive protection.

References

https://github.com/n8n-io/n8n/security/advisories/GHSA-fg85-4wv2-p98j

https://www.vulncheck.com/advisories/n8n-before-2.36.2-expression-sandbox-bypass-via-spreadelement

Alex Joseph
Alex Joseph

Alex Joseph is a Senior Support Staff professional with deep experience in server management, web hosting technologies, and cybersecurity operations. He works daily with Linux servers, cloud platforms, performance tuning, and security hardening, giving him strong real-world technical knowledge. Along with his support role, he write about security best practices, hosting infrastructure, and software management.