n8n: Expression Sandbox Escape

Published September 8, 2026 CVE-2026-86083

A flaw in n8n can let a low-privilege attacker run their own code on the n8n instance. It affects installations using n8n's legacy expression engine.

Severity
HighCVSS 4.0 · 7.7
Fix
Fixed in 1.123.76Fix recorded today
Affected versions
2.38.0 or newer, but before 2.38.2; 2.0.0 or newer, but before 2.37.7; before 1.123.76
Weakness
CWE-94Code Injection
Exploit likelihood
0.28% in 30 daysEPSS, higher than 20% of known flaws
Affects
n8n

How it works

  • A low-privilege attacker can replace n8n's shared JSON.stringify function.
  • The legacy expression engine then uses that changed function while generating code.
  • The generated code can include executable attacker-controlled content.

What to do

Run npm list n8n in the environment hosting n8n and compare the installed version with the affected ranges in the n8n advisory. Check whether the instance uses the legacy expression engine.

Run this in the application environment you want to check:

npm list n8n

Upgrade to n8n 1.123.76, 2.37.7, or 2.38.2, depending on your release branch. If upgrading is temporarily impossible, set N8N_EXPRESSION_ENGINE=vm and restrict access to fully trusted users as short-term measures.

Technical details

The legacy expression engine used the mutable global JSON.stringify function while generating code. Replacing that function could cause generated source to contain executable attacker-controlled code. The vm expression engine is not affected.

Severity breakdown

  • Attack vector Network Requires network access to the vulnerable service
  • Attack complexity Low No extra steps to bypass built-in attack protections
  • Required conditions Present Attack depends on particular deployment or execution conditions
  • Privileges required Low Attacker needs a basic user account
  • User action None No action by another user is required
  • Vulnerable system: Data exposure High Sensitive data can be exposed with serious impact
  • Vulnerable system: Data changes High Protected data can be changed with serious impact
  • Vulnerable system: Service disruption High The service can stop or suffer serious disruption
  • Other systems: Data exposure None No additional impact beyond the vulnerable system
  • Other systems: Data changes None No additional impact beyond the vulnerable system
  • Other systems: Service disruption None No additional impact beyond the vulnerable system
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Open in FIRST.org calculator

References