n8n: Expression sandbox escape via arrow-function bodies enabling command execution
n8n
- Severity
- High, CVSS 8.7
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Record
- GHSA-gv7g-jm28-cr3m
- Affects
- n8n
- Known exploited
- Not listed in the CISA Known Exploited Vulnerabilities catalog
- Published
- Record first published by the source
- July 22, 2026
- Source last modified
- July 27, 2026
Description
Impact
An authenticated user with permission to create or modify workflows could abuse crafted expressions using arrow functions to bypass the expression sandbox, triggering unintended system command execution on the host running n8n.
Patches
The issue has been fixed in n8n versions 2.31.5 and 2.32.1. Users should upgrade to one of these versions or later to remediate the vulnerability.
Workarounds
If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Restrict n8n instance access to fully trusted users only. - Restrict workflow creation and editing permissions to fully trusted users only.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Description quoted from the GitHub Advisory Database.
Who is affected
This problem affects n8n, a tool for connecting apps and automating routine tasks through step-by-step workflows. A person who is signed in to n8n and allowed to create or change workflows could write specially crafted formulas (the small expressions workflows use to work with data) that slip past the safety limits placed on them. That would let them run commands on the computer that hosts n8n. The fix is in versions 2.31.5 and 2.32.1, so any copy of n8n not yet updated to one of those versions or later should be treated as affected. This flaw is rated High.
What to do
- The person who installed or runs n8n for your organization should handle this. If an IT provider or vendor runs it for you, send them this advisory and ask when the update will be done.
- Update n8n to version
2.31.5or2.32.1, or a later version. - If you cannot update right away, restrict n8n instance access to fully trusted users only.
- Until the update is done, also restrict workflow creation and editing permissions to fully trusted users only. These steps do not fully remove the risk and should only be used for a short time.
Analysis written from the source record as of July 27, 2026 and reviewed before publishing.