Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege n8n user
-
DeliveryAuthor expression overriding global JSON.stringify
-
ExploitSubmit expression through legacy engine code path
-
ExecutionTainted JSON.stringify corrupts subsequent code generation
-
ImpactAttacker-controlled JavaScript executes in n8n backend process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) an authenticated session with sufficient privileges to create or edit workflow expressions (PR:L - low-privilege user is sufficient, not anonymous access); (2) the n8n instance must be using the legacy expression engine - the vm expression engine is explicitly documented as unaffected, meaning instances configured or migrated to use vm are not at risk; (3) the attacker's expression must be evaluated through the code-generation paths in isolated-vm-bridge.ts or ExpressionBuilder.ts. Limiting factors: unauthenticated access is insufficient; read-only n8n accounts cannot author expressions; instances running exclusively on the vm engine are not vulnerable regardless of version. |
| Impact | The CVSS 4.0 score is 7.7, driven by AV:N/PR:L and high VC/VI/VA impact, but tempered by AT:P (attack requirements present) and PR:L (authenticated user required). The AT:P flag reflects that the legacy expression engine must be in use, as the vm engine is unaffected - deployments that have migrated or default to the vm engine are not vulnerable. No CISA KEV listing and no public exploit code have been identified, and the EPSS signal is absent from the provided data, limiting exploitation-probability assessment. The real-world risk is meaningful for self-hosted n8n instances where users with workflow-editing rights are not fully trusted, since a low-privilege authenticated user could inject code that executes in the n8n backend process. Managed or SaaS deployments that isolate tenant expression contexts may face different exposure. The scope of impact (VC:H/VI:H/VA:H on the vulnerable system with no subsequent-system impact per SC:N/SI:N/SA:N) suggests the code injection executes within n8n's own process context rather than escaping to a broader system. |
| Exploit ScenarioDerived | An authenticated n8n user with workflow-editing rights creates a workflow node whose expression overrides JSON.stringify with a function that embeds malicious JavaScript. When the legacy expression engine's code generator subsequently calls JSON.stringify while building source text for another expression or timezone interpolation, the attacker's payload is inserted into the generated code and executed within the n8n backend process. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 08, 2026
Code injection in n8n's legacy expression engine allows an authenticated user to replace the mutable global JSON.stringify function within expression evaluation, causing subsequent code-generation paths to embed and execute attacker-controlled JavaScript. Affected are all n8n versions prior to 1.123.76 (v1 branch), 2.37.7, and 2.38.2. The vulnerability is confined to the legacy expression engine (isolated-vm-bridge.ts and ExpressionBuilder.ts); the vm expression engine is unaffected. No public exploit or CISA KEV listing has been identified at time of analysis.
RemediationAI
Upgrade n8n to version 1.123.76 (v1 branch), 2.37.7, or 2.38.2 (v2 branch) as documented in the GitHub security advisory GHSA-6xcw-7xm6-48c6 and the corresponding release tags at https://github.com/n8n-io/n8n/releases/tag/n8n@2.37.7 and https://github.com/n8n-io/n8n/releases/tag/n8n@2.38.2. If immediate upgrade is not possible, switching to the vm expression engine (if configurable) eliminates the vulnerable code path per the advisory. As a compensating control, restricting workflow-editing rights to fully trusted users reduces the attack surface, since exploitation requires authenticated access with expression authoring privileges. Note that restricting user roles carries the trade-off of limiting legitimate automation capabilities.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
n8n is a Node.js-based workflow automation platform that evaluates user-supplied expressions to transform data between workflow nodes. The legacy expression engine relies on JavaScript code generation, calling the mutable global JSON.stringify during synthesis of string literals and timezone interpolation. Because JavaScript globals like JSON.stringify can be replaced at runtime within the same execution context, a crafted expression can shadow the global with an attacker-controlled function. Any subsequently generated source in the same code-generation pipeline will then embed the attacker's payload as executable JavaScript. The affected code paths are packages/@n8n/expression-runtime/src/bridge/isolated-vm-bridge.ts (isolated-vm sandbox bridge) and packages/@n8n/tournament/src/ExpressionBuilder.ts. CWE-94 (Improper Control of Generation of Code) correctly characterizes the root cause: user input influences the code-generation pipeline without sufficient isolation of the global state.
Know when N8n gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AC:H reflects AT:P (legacy engine must be active); PR:L for authenticated user; S:U per SC:N/SI:N/SA:N in provided CVSS 4.0.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
n8n is an open source workflow automation platform. Prior to 1.123.76, 2.37.7, and 2.38.2, the legacy expression engine generated source text by calling the mutable global JSON.stringify while printing synthetic string literals and interpolating timezone data. An expression could replace JSON.stringify and cause later generated source to contain executable attacker-controlled code. The affected code-generation paths include packages/@n8n/expression-runtime/src/bridge/isolated-vm-bridge.ts and packages/@n8n/tournament/src/ExpressionBuilder.ts, and the issue does not affect the vm expression engine. This issue is fixed in versions 1.123.76, 2.37.7 and 2.38.2.
Technical POC Analysis
CWE-94: code injection through unsafe code generation.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
n8n workflow automation platform versions prior to 1.123.76, 2.37.7, and 2.38.2 contain an authenticated code injection flaw in the legacy expression engine that permits authorized users to execute arbitrary JavaScript within workflows. Exploitation enables attackers to manipulate critical business automations, exfiltrate data from integrated systems, and potentially compromise downstream services connected through n8n.
Apply vendor patch. Interim mitigations if patching is delayed: restrict n8n user access to trusted personnel only, disable legacy expression engine if vm engine is available as alternative, and implement strict monitoring of workflow definition changes and execution logs.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
n8n workflow automation (through 1.121.2) allows authenticated users to execute arbitrary code via the n8n service, with
n8n workflow automation (1.65.0 to 1.121.0) allows unauthenticated file access through form-based workflows. A critical
n8n has a fifth critical RCE vulnerability (CVSS 9.9) in the Expression evaluator, enabling code execution through craft
Authenticated users who can create or modify an n8n workflow can achieve remote code execution on the n8n host by abusin
A prototype pollution vulnerability in the XML and GSuiteAdmin nodes of n8n workflow automation platform allows authenti
An authenticated user with workflow creation or modification privileges in n8n workflow automation platform can exploit
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Second-order expression injection in n8n workflow automation before 2.10.1/2.9.3/1.123.22. Crafted workflow data trigger
An arbitrary file upload vulnerability in the Chat Trigger component of N8N v1.95.3, v1.100.1, and v1.101.1 allows attac
Authenticated n8n users can hijack administrator accounts when LDAP authentication is enabled by manipulating their LDAP
The n8n package 0.218.0 for Node.js allows Escalation of Privileges. Rated high severity (CVSS 8.8), this vulnerability
EUVD-2026-74273
GHSA-6xcw-7xm6-48c6
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB