CVE-2026-85169: n8n: $fromAI sandbox escape enables RCE

HIGH
Published September 3, 2026
CISO Take

A flaw in n8n's $fromAI handler lets an authenticated workflow builder walk the JavaScript prototype chain to the Function constructor and execute arbitrary code in the main n8n process, effectively escaping the expression sandbox meant to isolate AI Agent tool parameters. This matters because n8n underpins agentic automation for 16+ downstream dependents and carries a package risk score of 69/100 with 211 other CVEs already recorded against it, signaling a track record of security debt in a tool increasingly wired into production AI workflows with access to credentials and internal systems. There's no EPSS score, no CISA KEV listing, and no public exploit or Nuclei template yet, so this looks pre-weaponization rather than under active attack — but the technique (an own-property/reserved-key bypass leading to a live prototype reference) is a well-understood class of JS sandbox escape that a moderately skilled attacker could reproduce from the public GHSA advisory alone. Any org running self-hosted n8n with AI Agent nodes and multiple workflow editors should treat this as urgent: upgrade to 1.123.73, 2.35.4, or 2.36.2 immediately, and in the interim restrict workflow-build/editor roles to trusted users and audit workflows for $fromAI usage with attacker-controllable placeholder names.

Sources:NVDGitHub AdvisoryOpenSSFATLASvulncheck.com

What is the risk?

Functionally critical despite the missing CVSS score: successful exploitation yields arbitrary code execution in the main n8n process, exposing all credentials, connected integrations, and stored workflow data on the instance. The barrier to exploitation is workflow-build privilege — not admin, just the ability to author or edit a workflow — which in many n8n deployments is granted broadly to automation engineers, ops staff, or even external contractors. No EPSS percentile, KEV listing, or public PoC/Nuclei template exists yet, so opportunistic mass exploitation is unlikely in the short term; the primary near-term risk is targeted abuse by a malicious or compromised insider with editor access, or lateral movement following compromise of a lower-privileged n8n account.

How does the attack unfold?

Initial access
Attacker obtains or already holds workflow-build/editor privileges in an n8n instance, sufficient to create or modify an AI Agent node.
AML.T0053
Sandbox escape
Attacker crafts a $fromAI expression using a reserved/prototype key name against a primitive value, causing the handler to return a live host-prototype reference instead of an isolated copy.
AML.T0107
Privilege escalation
Attacker walks the exposed prototype chain to reach the JavaScript Function constructor, compiling arbitrary code.
AML.T0050
Impact
Compiled code executes with the privileges of the main n8n process, exposing all stored credentials, integrations, and workflow data on the instance.
AML.T0112

What systems are affected?

PackageEcosystemVulnerable RangePatched
n8nnpm—No patch
209.2KOpenSSF 7.116 dependentsPushed 3d ago44% patched~19d to patchFull package profile →

Do you use n8n? You're affected.

How severe is it?

CVSS 3.1
N/A
EPSS
0.9%
chance of exploitation in 30 days
Higher than 59% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What should I do?

1 step
  1. Patch immediately to n8n 1.123.73, 2.35.4, or 2.36.2, which fix the own-property and reserved-key validation in the $fromAI resolver. If immediate patching isn't possible, restrict workflow-build/editor roles to trusted, vetted users only, and audit existing workflows for AI Agent nodes calling $fromAI with attacker-influenceable placeholder names (especially reserved keys like constructor, __proto__, or prototype). For detection, monitor n8n process logs and host-level EDR for unexpected child processes, Function constructor invocations, or outbound connections originating from the n8n Node.js process outside expected workflow execution, and review the GHSA-9x83-43r8-5hwc advisory and the VulnCheck writeup for exact indicator patterns.

What does CISA's SSVC say?

DecisionTrack
Exploitationnone
AutomatableNo
Technical Impacttotal

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

ISO 42001
A.6.2.4-AI system design and development controls
NIST AI RMF
MEASURE 2.7-AI system security and resilience is evaluated and documented
OWASP LLM Top 10
LLM07-Insecure Plugin Design

Frequently Asked Questions

What is CVE-2026-85169?

A flaw in n8n's $fromAI handler lets an authenticated workflow builder walk the JavaScript prototype chain to the Function constructor and execute arbitrary code in the main n8n process, effectively escaping the expression sandbox meant to isolate AI Agent tool parameters. This matters because n8n underpins agentic automation for 16+ downstream dependents and carries a package risk score of 69/100 with 211 other CVEs already recorded against it, signaling a track record of security debt in a tool increasingly wired into production AI workflows with access to credentials and internal systems. There's no EPSS score, no CISA KEV listing, and no public exploit or Nuclei template yet, so this looks pre-weaponization rather than under active attack — but the technique (an own-property/reserved-key bypass leading to a live prototype reference) is a well-understood class of JS sandbox escape that a moderately skilled attacker could reproduce from the public GHSA advisory alone. Any org running self-hosted n8n with AI Agent nodes and multiple workflow editors should treat this as urgent: upgrade to 1.123.73, 2.35.4, or 2.36.2 immediately, and in the interim restrict workflow-build/editor roles to trusted users and audit workflows for $fromAI usage with attacker-controllable placeholder names.

Is CVE-2026-85169 actively exploited?

No confirmed active exploitation of CVE-2026-85169 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-85169?

Patch immediately to n8n 1.123.73, 2.35.4, or 2.36.2, which fix the own-property and reserved-key validation in the $fromAI resolver. If immediate patching isn't possible, restrict workflow-build/editor roles to trusted, vetted users only, and audit existing workflows for AI Agent nodes calling $fromAI with attacker-influenceable placeholder names (especially reserved keys like constructor, __proto__, or prototype). For detection, monitor n8n process logs and host-level EDR for unexpected child processes, Function constructor invocations, or outbound connections originating from the n8n Node.js process outside expected workflow execution, and review the GHSA-9x83-43r8-5hwc advisory and the VulnCheck writeup for exact indicator patterns.

What systems are affected by CVE-2026-85169?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, workflow automation, orchestration pipelines.

What is the CVSS score for CVE-2026-85169?

No CVSS score has been assigned yet.

What is the AI security impact?

Affected AI Architectures

agent frameworksworkflow automationorchestration pipelines

MITRE ATLAS Techniques

AML.T0050Command and Scripting Interpreter
AML.T0053AI Agent Tool Invocation
AML.T0105Escape to Host
AML.T0112Machine Compromise

Compliance Controls Affected

ISO 42001: A.6.2.4
NIST AI RMF: MEASURE 2.7
OWASP LLM Top 10: LLM07

What are the technical details?

Original Advisory

n8n versions before 1.123.73, 2.35.4, and 2.36.2 contain an expression sandbox escape in the $fromAI handler. $fromAI resolved a caller-supplied placeholder name without requiring it to be an own property and admitted reserved keys; against a primitive input value it returned a live host-prototype reference. An attacker with workflow-build privilege can walk the prototype chain to the Function constructor and compile/execute arbitrary code in the main n8n process, leading to remote code execution.

Exploitation Scenario

A contractor or low-trust automation engineer with workflow-build access in a shared n8n instance creates an AI Agent node and configures a $fromAI expression using a placeholder name that maps to a reserved/prototype key (e.g., constructor) instead of an own property. When the handler resolves this against a primitive input value, $fromAI returns a live reference into the host's JavaScript prototype chain rather than a sandboxed copy. The attacker walks that chain to reach the Function constructor, compiles arbitrary JavaScript, and executes it with the same privileges as the main n8n process — harvesting stored credentials for every connected integration (databases, SaaS APIs, cloud accounts) and pivoting further into the environment.

Weaknesses (CWE)

CWE-94 — Improper Control of Generation of Code: The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

  • [Architecture and Design] Refactor your program so that you do not have to dynamically generate code.
  • [Architecture and Design] Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.

Source: MITRE CWE corpus.

Timeline

Published
September 3, 2026
Last Modified
October 29, 2026
First Seen
September 3, 2026

Related Vulnerabilities