Two severe vulnerabilities in n8n could allow an authenticated attacker to escape sandboxing mechanisms and execute arbitrary code, the JFrog Security Research team revealed Tuesday.n8n is an open-source workflow automation platform used by organizations and developers to connect applications, automate repetitive tasks and build integrations through a low-code/no-code visual interface.The first vulnerability, tracked as CVE-2026-1470, has a critical CVSS score of 9.9 and affects n8n’s expression engine, which can execute JavaScript code.Expressions can be added to any node’s parameters during workflow configuration, with an abstract syntax tree (AST) based sandbox used to prevent potentially dangerous code from executing in the victim’s environment.The expression engine sanitizes expressions by blocking common sandbox escape mechanisms that use “this,” “prototype,” “constructor” or “$” identifiers to access the real global context.
Related reading:
However, JFrog researchers found that “with” statements could be used to bypass this sanitization, as they are not blocked by the AST parser, and the sanitization process uses a static regex check to look for occurrences of “.constructor” but not “constructor” as a standalone identifier.“This allows us to trick the AST checks by introducing a decoy constructor identifier inside a with statement and scoping it to function (){}, which effectively resolves to the Function object,” JFrog Security Researcher Nathan Nehorai wrote.By reaching the Function object via constructor, an attacker with access to configure node parameters can escape the sandbox and achieve remote code execution (RCE), potentially leading to a complete takeover of the n8n instance, according to JFrog.The vulnerability is fixed in versions 1.123.17, 2.4.5 and 2.5.1, with all earlier versions susceptible to the flaw.
Security Operations, SOC, Vulnerability Management, Patch/Configuration Management, Application security, DevSecOps

Two n8n sandbox escape vulnerabilities allow RCE

(Credit: Azulblue – stock.adobe.com)

Related Events
Get daily email updates
SC Media's daily must-read of the most current and pressing daily news
You can skip this ad in 5 seconds



