n8n legacy expression engine allows code execution via JSON.stringify override

HighSE Fix-First Score 43/100CVE-2026-86083SE-AIV-01736Remote code executionAI softwareMade public 11 Sep 2026

Download as PDF

What this means

An attacker with access to n8n expressions can run arbitrary code on the server where n8n runs. This could expose sensitive data, modify or delete workflows and data, or allow further attacks on connected systems. The risk is highest if n8n has access to credentials, databases, or external APIs.

SecurityElites Manager Brief: the decision in one minute

An attacker who can access n8n expressions in older versions can run code on your server by overriding a global function. This risks data theft and system compromise. Upgrade immediately to version 1.123.76, 2.37.7, 2.38.2 or later, or switch to the vm expression engine now.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixPlatform engineering or DevOps team (whoever manages n8n infrastructure).
Likely effortAbout 15 to 30 minutes: check which expression engine you use, upgrade n8n to the fixed version, and restart. It may take longer if you run n8n across multiple machines or in a container orchestration system.

Questions to ask your team or supplier

  • Which version of n8n are we running, and are we using the legacy or vm expression engine?
  • Who has access to create or edit n8n expressions and workflows, and do we trust all of them?
  • What sensitive data, APIs, and systems does our n8n instance have access to, and what would happen if an attacker gained code execution there?

Message you can forward to the owning team

Security notice: n8n legacy expression engine allows code execution via JSON.stringify override (CVE-2026-86083)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.38.2 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-86083-n8n-legacy-expression-engine-allows-code-execution-via-json-stringify/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01736

What is at stake in your AI setup

  • Keys and secrets for external APIs and AI providers that n8n stores and uses in workflows could be extracted by malicious code execution.
  • Prompts, chat history, and AI model parameters used in n8n workflows could be read or modified by an attacker with code execution.
  • Tools and systems that n8n agents are connected to (databases, APIs, file systems) could be accessed or manipulated by exploited expressions.
  • Training or retrieval data used in n8n AI nodes could be exfiltrated or poisoned by an attacker who gains code execution.

Map where your company uses AI

Who is exposed

  • n8n instances using the legacy expression engine with untrusted user access
  • Teams running n8n version 1.123.75 or earlier
  • Teams running n8n version 2.0.0 to 2.37.6
  • Teams running n8n version 2.38.0 to 2.38.1

Upgrades you need

SoftwareAffected versionsMove to
n8n
npm
Every version before 1.123.76; 2.38.0 up to, but not including, 2.38.2; 2.0.0 up to, but not including, 2.37.72.38.2 or later

Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.76, 2.37.7, 2.38.2.

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededAn ordinary user account
Does a person have to do somethingNo. It works without anyone clicking or opening anything
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: 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

Kind of coding mistake

  • CWE-94: code can be injected

If you cannot upgrade today

  • Set the environment variable `N8N_EXPRESSION_ENGINE=vm` to use the safer expression engine. This does not fix the vulnerability but prevents the legacy engine from being exploited.
  • Restrict access to n8n to fully trusted users only until you upgrade.
  • Run the n8n process under a low-privilege user account so that if code execution does occur, the attacker has fewer permissions on the server.

Signs it may already have been used against you

  • Search n8n workflow and execution logs for expressions containing `JSON.stringify` or attempts to override global variables like `global.JSON` or `globalThis.JSON`.
  • Look for workflows created or modified by users who do not normally create workflows, or workflows with suspicious expression nodes that do not match your organization's normal workflow patterns.
  • Check system logs on the n8n server for unexpected process execution or child processes spawned from the n8n process that do not match normal operation.
  • Review audit logs for activities that coincide with workflow creation or expression changes, particularly from users who should not have high privileges.

Log searches to start from

Search for suspicious expressions (field names must be adapted to your logs)Splunk

source="n8n*" (expression OR workflow) (JSON.stringify OR globalThis OR global.JSON) | stats count by user, workflow

Search for expression engine logs (field names must be adapted to your logs)Elastic

process.name:n8n* AND (message:"JSON.stringify" OR message:"globalThis") | groupby user, timestamp

Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.

SecurityElites Fix Guide: step by step

  1. Find the n8n version you are runningLog in to your n8n web interface and go to Settings or About. Note the version number displayed. Alternatively, if you deployed n8n via npm or Docker, check the installed package version or container image tag.
  2. Check which expression engine is in useCheck whether the environment variable `N8N_EXPRESSION_ENGINE` is set to `legacy` or not set at all (which defaults to legacy in older versions). You can check this in your deployment configuration, Docker Compose file, Kubernetes manifests, or systemd service file. If you see `N8N_EXPRESSION_ENGINE=vm`, you are already using the safer engine.
  3. If you must delay the upgrade, apply a temporary workaroundSet the environment variable `N8N_EXPRESSION_ENGINE=vm` before n8n starts. This switches to the safer expression engine. This is not a full fix and should only be used while you prepare to upgrade. You must still upgrade as soon as possible.
  4. Back up your n8n data and workflowsExport or snapshot your n8n database and workflow files. This ensures you can recover if the upgrade has unexpected effects.
  5. Upgrade n8n to the fixed versionDownload and install n8n version 1.123.76, 2.37.7, or 2.38.2 or later, depending on which major version you are on. If you use npm, run the upgrade command provided by your package manager. If you use Docker, pull the fixed image tag and redeploy.
  6. Restart n8nStop the n8n process or service, then start it again. If n8n is running in Docker or Kubernetes, restart the pod or container.
  7. Verify the upgrade was successfulLog in to n8n and check that the version number displayed in Settings or About matches the fixed version you installed (1.123.76, 2.37.7, 2.38.2, or later).
  8. Review access and audit logs if availableCheck whether anyone with access to n8n expressions might have exploited this before the fix. Look for unusual workflows, expressions that override global variables, or unexpected data access in your n8n activity logs or audit trail.

How to confirm it is fixed: Log in to n8n and confirm the version shown in Settings or About is 1.123.76 or later (for version 1.x), 2.37.7 or later (for version 2.37.x), or 2.38.2 or later (for version 2.38.x or later).

SecurityElites Quick Fixes: copy and paste

Upgrade n8n with npmupgrade

npm install n8n@2.38.2
npm ls n8n

Check n8n version via npmfor this issue

npm list n8n

Check environment variable (Linux/macOS)for this issue

echo $N8N_EXPRESSION_ENGINE

Set safer expression engine in Docker Composefor this issue

services:
  n8n:
    image: n8n:latest
    environment:
      N8N_EXPRESSION_ENGINE: vm

Run the service in a locked-down containergeneral hardening

docker run --read-only --cap-drop ALL \
  --security-opt no-new-privileges --user 1000:1000 \
  -p 127.0.0.1:8080:8080 YOUR_IMAGE

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2026-86083) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - n8n (npm): must be 2.38.2 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

If a user creates an expression that changes `JSON.stringify`, what could happen on the legacy expression engine?A good answer: The attacker could make n8n generate and run malicious code instead of the intended expression, achieving remote code execution on the n8n server.
Which n8n versions are affected by this vulnerability?A good answer: Versions before 1.123.76, versions 2.0.0 to 2.37.6, and versions 2.38.0 to 2.38.1 are affected; all only if using the legacy expression engine.
What should we do if we cannot upgrade immediately?A good answer: Set `N8N_EXPRESSION_ENGINE=vm` to use the safer engine, restrict access to trusted users only, and run n8n as a low-privilege user until you can upgrade.
How can we tell whether this vulnerability has been exploited against our n8n instance?A good answer: Look in n8n logs and workflow history for expressions that override `JSON.stringify` or global variables, check for unexpected workflows or workflow changes, and review system logs for unusual child processes spawned by n8n.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## n8n legacy expression engine allows code execution via JSON.stringify override (CVE-2026-86083)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01736 https://securityelites.com/ai-vulnerabilities/cve-2026-86083-n8n-legacy-expression-engine-allows-code-execution-via-json-stringify/

### Why this matters
An attacker with access to n8n expressions can run arbitrary code on the server where n8n runs. This could expose sensitive data, modify or delete workflows and data, or allow further attacks on connected systems. The risk is highest if n8n has access to credentials, databases, or external APIs.

### What to do
1. Find the n8n version you are running
2. Check which expression engine is in use
3. If you must delay the upgrade, apply a temporary workaround
4. Back up your n8n data and workflows
5. Upgrade n8n to the fixed version
6. Restart n8n
7. Verify the upgrade was successful
8. Review access and audit logs if available

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-86083-n8n-legacy-expression-engine-allows-code-execution-via-json-stringify/

### Done when
- [ ] n8n is at 2.38.2 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and confirm the version shown in Settings or About is 1.123.76 or later (for version 1.x), 2.37.7 or later (for version 2.37.x), or 2.38.2 or later (for version 2.38.x or later).
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 10 Sep 2026: Made public
  • 2 Dec 2026: Published

Official record

## ImpactTwo stages of expression code generation built source text by calling the global `JSON.stringify` at generation time: the compiler when printing synthetic string literals, and the isolate bridge when interpolating a timezone value into its per-evaluation wrapper. An expression that replaced that global therefore changed the code that was subsequently generated and executed, turning literal data into executable source. The patch renders both code-generation stages through a reference captured at module load, so a later change to global state cannot alter the generated source.This vulnerability only affects instances running the legacy expression engine. The `vm` expression engine, which is the default on the patched releases, is not affected.## PatchesThe issue has been fixed in n8n versions 1.123.76, 2.37.7, and 2.38.2. Users should upgrade to one of these versions or later to remediate the vulnerability.## WorkaroundsIf upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Set the environment variable `N8N_EXPRESSION_ENGINE=vm` to switch to the vm expression engine, which is not affected by this vulnerability. - Restrict n8n instance access to fully trusted users only. - Ensure the n8n process runs under a dedicated low-privilege OS user account to limit the impact of any command execution.These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Weakness type: CWE-94

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-86083

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.