Skip to main content
Blue Moose logo Blue Moose Field notes
← All articles
n8n

n8n's expression sandbox escape: patch to 2.49.2

Code on a dark editor screen, shot at an angle

If you self-host n8n, the scary part of an "expression sandbox" is that it is the only thing between a workflow author and your host. On 26 November the n8n maintainers published GHSA-w6f8-8qh4-h3j4: a High-severity escape from that sandbox that runs code in the main n8n process. I run n8n next to a few other things on one box, so I read it the same evening.

What the advisory says

n8n evaluates workflow expressions inside a sandboxed V8 isolate. According to the advisory, the bundled V8 engine mishandled how it internalizes certain strings, and a crafted expression could corrupt memory, escape the isolate and execute arbitrary code in the main n8n process, with the privileges of the n8n service user. It is rated High with a CVSS v4 base score of 7.7. No CVE is assigned at the time of writing.

The prerequisite is the interesting bit: the attacker needs an account that can create and run workflows. That is "low privileges", not "unauthenticated", so it matters most on instances with several users, invited collaborators or shared team setups. A single-user box where only I can edit workflows is far less exposed, though not immune if an account is ever phished.

Fixed versions

  • npm package n8n: affected below 2.49.2, fixed in 2.49.2 and later.
  • Docker image n8nio/n8n: affected below 3.4.0, fixed in 3.4.0 and later.
  • Pointer-compression images are patched too: 2.47.6-pc, 2.48.3-pc and 3.2.2-pc.

The advisory's only stopgap is organisational: limit access to fully trusted users, and remove workflow creation and editing rights from everyone else until you can upgrade. It is explicitly short-term and not a fix.

It was not the only advisory this month

The n8n advisory list shows eight published in November, two of them High. The other High one, from 13 November, is GHSA-q8rc-7m84-mfvj: a custom instance role with user-management permissions gives control of the owner account. Three more landed alongside the sandbox escape on the 26th, all rated Moderate: unredacted node errors sent to the editor, a Chroma Vector Store node exposing the host's Chroma Cloud account to members, and unclaimed WebSocket upgrade requests that exhaust file descriptors. I have not dug into every one, so check each advisory for its own patched version rather than assuming the one above covers it.

What I do about it

The pattern across these advisories is the same: n8n is a tool where "can build workflows" is nearly equivalent to "can run code on my server", and the sandbox is a speed bump rather than a wall. So I treat the editor as a privileged interface. I keep it behind SSO or a VPN, I do not hand out editor roles casually, and I pin an explicit image tag instead of latest so upgrades are a decision I make on purpose. I also run the container as a non-root user with a read-only filesystem where I can, so a process-level escape lands somewhere dull.

My takeaway: if more than one person can edit workflows on your instance, upgrade today, then check what that service user can actually reach. If it is only you, upgrade this week anyway, because the next advisory will not wait for your schedule.

BM
Blue Moose
The moose behind Blue Moose. Full-stack PHP developer — Drupal by day, Symfony by night, tests always.