Incident report · Tool misuse
n8n Sandbox Escape Allows OS Command Execution
n8n rewrote workflow expressions through an abstract syntax tree sandbox so an authenticated editor could not reach Node.js internals. Security Joes found two bypasses — a concise arrow function resolving to real globals, and Reflect.get() recovering process.getBuiltinModule — which loaded child_process and ran host commands with the privileges of the n8n process. The sandbox held against the property names it inspected, and not against the ones it was handed.
- Discovered
- Jul 27 2026
- Failure mode
- Tool misuse
- Impact
- GHSA-gv7g-jm28-cr3m (CVSS 8.7) · OS command execution, N8N_ENCRYPTION_KEY and stored credentials exposed
Summary from the public record. The failure mode’s analysis follows.
The API did its job. So did the agent. That was the problem.
A failure mode to test
The tools worked exactly as designed. The agent called them with the wrong arguments, at the wrong time, or more often than it should have, and no layer checked whether the call made sense before it ran.
This incident illustrates a failure mode to test. Whether a control stops it depends on the integration, policy and execution path; no Fencio prevention test is claimed here.
Say yes to the AI your business wants.
Book a 30-minute call. Bring your agents and your rules.
