CVE-2026-86083 in n8n
Summary
by MITRE • 09/09/2026
n8n is an open source workflow automation platform. Prior to 1.123.76, 2.37.7, and 2.38.2, the legacy expression engine generated source text by calling the mutable global JSON.stringify while printing synthetic string literals and interpolating timezone data. An expression could replace JSON.stringify and cause later generated source to contain executable attacker-controlled code. The affected code-generation paths include packages/@n8n/expression-runtime/src/bridge/isolated-vm-bridge.ts and packages/@n8n/tournament/src/ExpressionBuilder.ts, and the issue does not affect the vm expression engine. This issue is fixed in versions 1.123.76, 2.37.7 and 2.38.2.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 09/09/2026
The vulnerability identified in n8n prior to versions 1.123.76, 2.37.7, and 2.38.2 represents a critical code injection flaw within the platform's legacy expression engine. This issue stems from an insecure coding practice where the source text for expressions was generated by invoking the mutable global JSON.stringify function during the printing of synthetic string literals and the interpolation of timezone data. In JavaScript environments, the global JSON object is not immutable by default, allowing a malicious actor to overwrite its stringify method with custom logic. By exploiting this mutability, an attacker can manipulate how strings are serialized within the expression engine's source generation process. This manipulation allows for the injection of arbitrary code into the generated source text, which is subsequently executed in the context where the expressions run.
The technical root cause lies in the specific implementation details found in packages/n8n/expression-runtime/src/bridge/isolated-vm-bridge.ts and packages/n8n/tournament/src/ExpressionBuilder.ts. These components are responsible for constructing the code that will be evaluated by the engine. Because they rely on a global, mutable function without proper isolation or protection against prototype pollution or method overriding, they create an attack surface where attacker-controlled input can alter the execution flow. The vulnerability specifically affects the legacy expression engine and does not impact the vm expression engine, which likely employs stricter sandboxing or immutable globals that prevent such manipulation. This distinction highlights a failure in defense-in-depth principles, as older code paths were left vulnerable while newer implementations may have adopted safer practices.
From an operational perspective, this flaw enables Remote Code Execution (RCE) if an attacker can control the inputs to the expression engine. In workflow automation platforms like n8n, users often configure workflows that process data from various sources, including webhooks and API integrations. If these inputs are not strictly validated before being passed into expressions, a malicious user could craft specific payloads that trigger the override of JSON.stringify. Once triggered, this leads to the execution of arbitrary JavaScript code within the n8n server environment. The impact is severe, potentially allowing full compromise of the underlying system, data exfiltration, or lateral movement within the network depending on the privileges under which the n8n instance operates. This aligns with CWE-94 Improper Control of Generation of Code (Code Injection) and maps to ATT&CK techniques such as T1059 Command and Scripting Interpreter for execution via JavaScript.
To mitigate this vulnerability, organizations running affected versions must immediately upgrade to version 1.123.76, 2.37.7, or 2.38.2 where the issue has been resolved. The fix likely involves either patching the specific code paths to avoid using mutable globals for critical string generation or implementing stricter input validation and sanitization routines. Additionally, administrators should review their workflow configurations to ensure that user-supplied data is not directly interpolated into expressions without adequate escaping or validation. Implementing Web Application Firewalls (WAFs) with rules targeting JavaScript injection patterns can provide an additional layer of defense during the transition period. Regular security audits focusing on dynamic code generation and evaluation practices are recommended to prevent similar issues in future development cycles, ensuring that global objects used for serialization remain immutable or are accessed through safe wrappers.