High · published September 3, 2026
n8n versions before 1.123.73, 2.35.4, and 2.36.2 contain an expression sandbox escape in the $fromAI handler. $fromAI resolved a caller-supplied placeholder name without requiring it to be an own property and admitted reserved keys; against a primitive input value it returned a live host-prototype reference. An attacker with workflow-build privilege can walk the prototype chain to the Function constructor and compile/execute arbitrary code in the main n8n process, leading to remote code execution.
| Product | Versions | Fixed in |
|---|---|---|
| n8n/n8n | < 1.123.73 | 1.123.73 |
| n8n/n8n | ≥ 2.0.0, < 2.35.4 | 2.35.4 |
| n8n/n8n | ≥ 2.36.0, < 2.36.2 | 2.36.2 |