← All articles Best Practices

CVE-2025-68613: n8n Workflow Automation RCE — Detection & Patch Guide

By Ammar Khan, CEH · October 24, 2026 · CybernytronX Research
CVE-2025-68613: n8n Workflow Automation RCE — Detection & Patch Guide

In December 2025, n8n — the open-source workflow automation platform widely used for internal tooling and AI agent orchestration — disclosed a critical remote code execution vulnerability tracked as CVE-2025-68613. The flaw allows an authenticated user with workflow-creation privileges to escape the intended sandbox and execute arbitrary code on the host via crafted expressions in workflow nodes. n8n's official security advisory rates it 9.9 on the CVSS v3.1 scale. Because n8n instances frequently sit on internal networks with broad API access, a compromised workflow can pivot into CRM, ticketing, and cloud infrastructure. This guide breaks down the vulnerability mechanics, affected versions, attacker techniques, and provides concrete detection rules and patched versions so your SOC can hunt and remediate.

Background: what CVE-2025-68613 actually is

CVE-2025-68613 is a sandbox escape in n8n's expression evaluation engine. n8n workflows use JavaScript expressions (in {{ }} blocks) to transform data between nodes. These expressions are evaluated inside a Node.js VM context intended to restrict access to the host. The vulnerability allows an authenticated user with permission to create or edit workflows to craft an expression that breaks out of that context and executes arbitrary code with the privileges of the n8n process.

According to n8n's GitHub security advisory (GHSA-xxxx-xxxx-xxxx), the issue affects all versions prior to 1.121.0. The advisory assigns a CVSS v3.1 base score of 9.9 (Critical) with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. The S:C (scope changed) reflects that the attacker gains capabilities beyond the original authorization scope — from workflow-level access to host-level code execution.

n8n is frequently deployed in enterprise environments for internal automation, often with high-privilege credentials stored in its credential store. A successful exploit therefore gives an attacker both code execution and access to any secrets those workflows can reach.

Affected versions and vendor advisory

The n8n security advisory states that all releases prior to 1.121.0 are vulnerable. The patched version is 1.121.0 and later. Self-hosted deployments (Docker, npm, Kubernetes) are affected; n8n Cloud was patched automatically by the vendor.

To confirm your version, run the following inside your n8n container or host:

n8n --version
# or, if using Docker:
docker exec -it n8n n8n --version

If the output is below 1.121.0, you are exposed. The advisory is available at https://github.com/n8n-io/n8n/security/advisories/GHSA-xxxx-xxxx-xxxx. As of this writing, CVE-2025-68613 has not been added to CISA's Known Exploited Vulnerabilities catalog, but given the low complexity and the popularity of n8n in AI/automation stacks, defenders should treat it as high-priority.

Attacker TTPs

Exploitation requires an authenticated account with workflow-editing permissions. Common initial access vectors include:

Once authenticated, the attacker creates a new workflow containing a node that evaluates a malicious expression. The expression leverages JavaScript prototype-chain manipulation to reach the process object and invoke child_process.exec. This maps to MITRE ATT&CK T1059.004 (Command and Scripting Interpreter: Unix Shell) on Linux hosts, or T1059.003 (Windows Command Shell) on Windows.

Post-exploitation, attackers typically:

Detection: Sigma, Suricata, and YARA

Sigma rule — suspicious workflow creation

This Sigma rule detects creation of workflows containing expression patterns commonly used in sandbox escapes. It assumes n8n audit logs are shipped to your SIEM.

title: n8n Suspicious Workflow Expression (CVE-2025-68613)
id: 9f2c1a7e-3b4d-4c8e-9a1f-7d6e5c4b3a21
status: experimental
description: Detects workflow creation containing expression sandbox escape patterns
references:
  - https://github.com/n8n-io/n8n/security/advisories/GHSA-xxxx-xxxx-xxxx
author: CybernytronX
date: 2025/12/20
logsource:
  product: n8n
  category: application
detection:
  selection_event:
    event_type: 'workflow.created'
  selection_pattern:
    expression|contains:
      - 'constructor.constructor'
      - '__proto__'
      - 'process.mainModule'
      - 'child_process'
      - 'require(''child_process'')'
  condition: selection_event and selection_pattern
falsepositives:
  - Legitimate advanced users writing complex expressions
level: high
tags:
  - attack.t1059.004
  - attack.t1078

Suricata rule — outbound shell callback

If your n8n host initiates unexpected outbound connections to raw IPs or non-standard ports shortly after a workflow execution, alert. This rule catches common reverse-shell patterns from the n8n process.

alert tcp $HOME_NET any -> $EXTERNAL_NET !80,!443 (msg:"Possible n8n RCE reverse shell (CVE-2025-68613)"; flow:to_server,established; content:"|2f 62 69 6e 2f 73 68|"; depth:20; classtype:trojan-activity; sid:100068613; rev:1;)

YARA rule — n8n process memory / dropped payloads

Use this YARA rule to scan for common post-exploit shell scripts dropped by n8n.

rule n8n_RCE_Payload
{
  meta:
    description = "Detects common reverse-shell scripts dropped by CVE-2025-68613"
    author = "CybernytronX"
    date = "2025-12-20"
  strings:
    $s1 = "bash -i >& /dev/tcp/" ascii
    $s2 = "nc -e /bin/sh" ascii
    $s3 = "python -c 'import socket" ascii
    $s4 = "child_process" ascii
  condition:
    any of them
}

Mitigation and patched versions

The vendor fix is available in n8n 1.121.0. Upgrade immediately using your deployment method:

If immediate patching is not possible, apply these compensating controls from the n8n hardening guide:

“All versions prior to 1.121.0 are affected. Users should upgrade to 1.121.0 or later.” — n8n security advisory, December 2025.

Why this matters for defenders

Workflow automation platforms like n8n occupy a dangerous middle ground: they are trusted to hold credentials for dozens of downstream systems, yet they are often treated as internal tooling with weaker change control than production applications. CVE-2025-68613 turns a low-privilege workflow author into a host-level code executor, and from there into a credential harvester with API access to your CRM, ticketing, and cloud. The lesson is not unique to n8n — it applies to any automation platform that evaluates user-supplied logic. Defenders should inventory these platforms, enforce least privilege on who can author workflows, and ship their audit logs to the SIEM with the same urgency as domain-controller logs. The Sigma and Suricata rules above give you a starting point, but the durable control is architectural: treat workflow engines as tier-0 assets, not convenience tools.

Sources

Frequently Asked Questions

Is CVE-2025-68613 exploitable without authentication?

No. The attacker must have a valid n8n account with permission to create or edit workflows. However, default deployments with weak admin passwords or exposed editor UIs are at elevated risk.

Does n8n Cloud require action?

No. n8n Cloud was patched by the vendor. Self-hosted deployments must upgrade to 1.121.0 or later.

What is the CVSS score of CVE-2025-68613?

The n8n advisory assigns a CVSS v3.1 base score of 9.9 (Critical), vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.

Can I detect exploitation without n8n audit logs?

Yes, but with lower fidelity. Monitor the n8n process for unexpected child processes (bash, sh, curl, wget) using EDR, and alert on outbound connections from the n8n host to non-standard ports or raw IPs.

Are there public exploits for CVE-2025-68613?

As of December 2025, the vulnerability is not listed in CISA KEV. However, given the low attack complexity, defenders should assume proof-of-concept code may circulate and prioritize patching.

What compensating controls work if I cannot patch immediately?

Restrict workflow authoring to trusted users, set N8N_BLOCK_ENV_ACCESS_IN_NODE=true, run n8n in a read-only container without host mounts, and place the editor behind an authenticating proxy.

Need expert help with this?

If your team runs n8n or similar automation platforms in production, a targeted review can close the gap between “patched” and “actually safe.” CybernytronX provides workflow-platform security assessments, SOC detection engineering, and Ethereon AI-driven threat detection tuned to your stack. We help you inventory automation assets, enforce least privilege on workflow authors, and build the logging pipeline that makes rules like the Sigma above actually fire. Reach out at cybernytronx.com/contact or explore Ethereon.

AK

Ammar Khan — Founder, CybernytronX

Certified Ethical Hacker (CEH), B.S. Cybersecurity, Google Certified. 5+ years pentesting, creator of Ethereon AI threat detection. Has remediated 50+ environments and recovered 20+ compromised domains. Hire CybernytronX →

← Back to all articles