CVE-2026-86076: CWE-94: Improper Control of Generation of Code ('Code Injection') in n8n-io n8n
Affects n8n-io n8nSource CVE Database V5
- Exploitation
Not in CISA KEV, no exploitation reported
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 55% of CVEs
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:N/SA:NWhat to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| n8n-ion8n | Affected
| Fixed in– |
GitHub Actionsn8n-io/n8npkg:github/n8n-io/n8nOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
This vulnerability is fixed in n8n versions 1.123.76, 2.37.7, and 2.38.2. Users should upgrade to these or later versions to remediate the issue. No vendor advisory is provided to indicate alternative mitigations or temporary fixes. Patch status is not explicitly confirmed beyond the fixed versions; users should verify with official n8n release notes.
Description
n8n is an open source workflow automation platform. Prior to 1.123.76, 2.37.7, and 2.38.2, the expression compiler sanitizer resolved through dynamically scoped this and did not reject reserved class member names. A class field named __sanitize could rebind the sanitizer and reach the Function constructor, enabling backend code execution and editor-preview JavaScript execution. The affected AST hook is PrototypeSanitizer in packages/workflow/src/expression-sandboxing.ts. This issue is fixed in versions 1.123.76, 2.37.7 and 2.38.2.
Summary
The vulnerability in n8n involves the expression compiler sanitizer that resolves through a dynamically scoped this and does not reject reserved class member names. Specifically, a class field named __sanitize can rebind the sanitizer and access the Function constructor, allowing an attacker to execute arbitrary code on the backend and within the editor preview. The affected code is in the PrototypeSanitizer AST hook located in packages/workflow/src/expression-sandboxing.ts. The issue is addressed in versions 1.123.76, 2.37.7, and 2.38.2.
Impact
Successful exploitation allows an attacker with limited privileges to execute arbitrary backend code and JavaScript in the editor preview, potentially leading to full compromise of the affected system. The CVSS 4.0 score of 8.7 reflects high impact with network attack vector, low attack complexity, and partial privileges required.
Weaknesses
References
- github.com/n8n-io/n8n/security/advisories/GHSA-hw8v-xxg5-vvvx (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/[email protected] (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/[email protected] (opens in a new tab)
- github.com/n8n-io/n8n/releases/tag/[email protected] (opens in a new tab)
Community reviews
Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.