NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

GHSA-gv7g-jm28-cr3m: n8n: Expression sandbox escape via arrow-function bodies enabling command execution

highCVSS 4.0 8.7

Crafted n8n expressions that use arrow-function bodies escape the expression sandbox and run system commands on the host. Any authenticated user who can create or modify workflows can do it, with no user interaction. Fixed in n8n 2.31.5 and 2.32.1. The 1.x line is not listed as affected or patched in this entry.

Published Jul 22, 2026 · Updated Jul 27, 2026 · Analysis Oct 25, 2026

What an attacker can do

n8n evaluates expressions, the {{ }} snippets in node fields, inside a sandbox that is meant to stop them reaching the host. Expressions that put code in arrow-function bodies get past that sandbox (CWE-94, code injection). The result is unintended system command execution on the machine running n8n.

The attacker needs an account that can create or modify workflows. That is a common right for team members. No user interaction is needed, and the CVSS 4.0 vector rates confidentiality, integrity and availability impact as high on the vulnerable system.

In practice, a workflow editor becomes a shell user for the n8n service account. From there they can read the credentials n8n stores, environment variables and API keys, and touch anything the host can reach. n8n instances usually hold keys to many other services, so one compromised editor can open a wide set of systems. The advisory gives no payload details.

Who is affected

Affected: n8n below 2.31.5, and 2.32.0. Instances where untrusted or semi-trusted people can create or edit workflows are the most exposed. The advisory names no 1.x release as affected or fixed.

Check the version:

npm ls n8n

For Docker, check the image tag or the version in the UI.

n8n

Ecosystem
npm
Affected
>= 2.32.0, < 2.32.1
Fixed in
2.32.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
< 2.31.5
Fixed in
2.31.5
Check
npm ls n8n

How to fix it

Upgrade to n8n 2.31.5 or 2.32.1, or later. For an npm install, run npm install [email protected].

Temporary mitigations from the advisory, neither of which fully removes the risk:

  • Restrict instance access to fully trusted users.
  • Restrict workflow creation and editing to fully trusted users.

After upgrading, treat credentials on a multi-user instance as exposed if an untrusted editor had access, and rotate them.

How to tell if you were hit

The advisory gives no log signature. Review workflows created or edited by non-admin users for expressions that contain arrow functions (=>) inside {{ }} fields, especially in fields where a plain value is expected. Look for child processes spawned by the n8n process, such as shells or network tools, and for outbound connections from the n8n host that your workflows do not explain. Check for new credentials, API keys or users created around the time of suspicious edits.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to inaor.

Questions

Who can exploit GHSA-gv7g-jm28-cr3m?

Any authenticated user with permission to create or modify workflows. No user interaction is needed and the attack runs over the network.

Which versions are fixed?

n8n 2.31.5 and 2.32.1, or later. Versions below 2.31.5 and 2.32.0 are affected.

Does it give code execution on the host?

Yes. The advisory says the sandbox escape triggers system command execution on the host running n8n.

Is it exploited in the wild?

The sources do not say so, and the entry is not in CISA's KEV catalog.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries