← All articles

n8n sandbox escape lets workflow editors run commands on the server

n8n patched a high-severity flaw that lets an authenticated user who can create or edit workflows escape the expression sandbox and run operating-system commands as the n8n process. Security Joes found it while probing n8n's February fix for an earlier sandbox bug, and the gap sits in how the rewriter handled a bare identifier in a concise arrow function body. Successful exploitation can expose the n8n encryption key and allow decryption of stored credentials. It is tracked as GHSA-gv7g-jm28-cr3m with a score of 8.7 and no CVE assigned yet. Fixed versions are 2.31.5 and 2.32.1, with no patched 1.x release listed.

Check
Update self-hosted n8n to 2.31.5 or 2.32.1 or later, and treat the vendor's interim advice to restrict editing to trusted users as an incomplete stopgap rather than a fix.
Affected
Self-hosted n8n deployments before 2.31.5 or on 2.32.0 (GHSA-gv7g-jm28-cr3m); any account allowed to create or modify workflows can run commands as the n8n process and expose stored credentials.
Fix
Upgrade to a fixed release, rotate the n8n encryption key and stored credentials if you ran an exposed version, and keep the instance off the public internet.