ZeroHour

CVE-2026-85169

large

Expression Sandbox Escape in n8n $fromAI Handler Enables Remote Code Execution

CVSS 4.0
8.7 high
EPSS
<1%p32
Published
()
Modified
AI analysis

n8n releases before 1.123.73, 2.35.4, and 2.36.2 contain an expression sandbox escape in the $fromAI handler that allows arbitrary code execution in the main n8n process. The flaw occurs because $fromAI resolves a caller-supplied placeholder name without verifying it is an own property and admits reserved keys; when applied to a primitive input value it returns a live host-prototype reference, letting an attacker walk the prototype chain to the Function constructor and compile/execute arbitrary JavaScript. Exploitation is over the network with low privileges and no user interaction (CVSS 4.0: 8.7 High), but requires the attacker to have workflow-build privilege, i.e., the ability to create or modify workflows. Anyone running an affected self-hosted n8n version who allows untrusted or semi-trusted users to build workflows is affected. No public proof-of-concept, CISA KEV listing, or confirmed in-the-wild exploitation is known, and EPSS currently estimates the 30-day exploitation probability at about 0.4% (percentile 32).

What to do: Upgrade self-hosted n8n to 1.123.73 if tracking the 1.x line, or to 2.35.4 / 2.36.2 if tracking the 2.x lines. Until patched, restrict workflow creation and editing to trusted users only, since exploitation requires workflow-build privilege, and review workflows that call $fromAI with unusual or reserved placeholder names. Internet-exposed n8n instances should be treated as priority targets given the RCE impact.

Affected
n8n (workflow automation platform, self-hosted)all versions before 1.123.73, before 2.35.4, and before 2.36.2 (fixed in 1.123.73, 2.35.4, and 2.36.2)
Estimated exposure
largetens of thousands of internet-exposed n8n instances (order 10^4–10^5), with total self-hosted plus n8n Cloud deployments likely in the hundreds of thousands… — Public internet-wide scans have indexed tens of thousands of n8n web interfaces, and n8n's very large open-source adoption plus its managed Cloud service imply a substantially larger unexposed install base, though the provider publishes no…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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.

Weakness
CWE-94
Vector
CVSS:4.0/AV:N/AC:L/AT:N/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

In the news

No ingested article mentions this CVE yet.