Critical RCE Flaw in n8n Automation Platform Allows Full Server Takeover

Critical Sandbox Escape Vulnerability (CVE-2026-25049) in n8n Allows Remote Code Execution

CRITICAL
February 6, 2026
5m read
VulnerabilitySupply Chain AttackCloud Security

Related Entities

Organizations

PillarCyber Security Agency of Singapore

Products & Tech

CVE Identifiers

CVE-2026-25049
CRITICAL
CVSS:9.4
CVE-2025-68613
NONE

Full Report

Executive Summary

A critical remote code execution (RCE) vulnerability, CVE-2026-25049, has been disclosed in the n8n open-source workflow automation platform. The vulnerability, which carries a CVSS score of 9.4, is a sandbox escape that allows an authenticated attacker with workflow editing permissions to execute arbitrary commands on the underlying server. Successful exploitation can lead to a complete server compromise, granting the attacker access to all environment variables, which often contain highly sensitive credentials, API keys, and OAuth tokens for connected services. This could allow an attacker to pivot and take control of integrated cloud accounts and AI pipelines. The flaw is a bypass for a previous RCE vulnerability (CVE-2025-68613), emphasizing the severity of the issue. The n8n team has released patches, and all users are strongly advised to upgrade to versions 1.123.17 or 2.5.2 immediately.


Vulnerability Details

CVE-2026-25049 is a sandbox escape vulnerability within n8n's JavaScript expression evaluation engine. The platform uses a sandbox to safely execute user-provided code within workflows, but researchers at security firm Pillar discovered a method to bypass this protection.

The flaw can be triggered by an authenticated user who has permissions to create or edit a workflow. By crafting a malicious JavaScript expression using specific properties with a template literal or certain arrow functions, an attacker can break out of the sandboxed environment. Once the sandbox is escaped, the attacker can execute arbitrary system commands with the privileges of the n8n service account.

This is particularly dangerous because n8n is designed to connect to and automate a wide range of other services. A compromise of the n8n server itself effectively hands the keys to all connected applications to the attacker.


Affected Systems

  • Product: n8n Workflow Automation Platform
  • Affected Versions: All versions prior to 1.123.17 and 2.5.2.
  • Patched Versions: 1.123.17 and 2.5.2.

Exploitation Status

There is no evidence of active exploitation in the wild at the time of disclosure. However, given the criticality of the vulnerability and the public availability of the details, organizations should assume that exploitation attempts are imminent. The low complexity of the attack (once a valid account is obtained) makes it an attractive target for threat actors.


Impact Assessment

A successful exploit of CVE-2026-25049 can have a catastrophic impact, representing a significant supply chain risk.

  • Full Server Compromise: Attackers gain RCE on the host server, allowing them to install backdoors, exfiltrate data, or use the server as a pivot point.
  • Credential and API Key Theft: The primary impact is the theft of all credentials stored as environment variables or within the n8n instance. This includes API keys, database credentials, and OAuth tokens for countless third-party services (e.g., AWS, Google Cloud, Slack, CRMs).
  • Hijacking of Connected Services: With the stolen credentials, attackers can take over connected cloud accounts, access or manipulate data in integrated applications, and disrupt business-critical automated workflows.
  • Lateral Movement: The compromised n8n server can be used to attack other systems within the internal network.

Cyber Observables for Detection

Detecting exploitation requires monitoring the n8n server and its logs.

Type Value Description Context Confidence
command_line_pattern n8n process spawning unexpected child processes like sh, bash, cmd.exe, powershell.exe. A strong indicator of successful sandbox escape and command execution. EDR, Sysmon Event ID 1 high
network_traffic_pattern Outbound connections from the n8n server to suspicious IP addresses (e.g., reverse shells). Attacker establishing a C2 channel after successful exploitation. Firewall logs, NetFlow high
log_source n8n application logs Look for logs containing suspicious JavaScript code snippets with template literals or arrow functions being saved in workflows. Application log monitoring medium

Detection Methods

  1. Version Checking: The most straightforward detection method is to inventory all n8n instances and check if they are running a vulnerable version (prior to 1.123.17 or 2.5.2).
  2. Endpoint Monitoring: Deploy an EDR agent on the n8n host server. Create detection rules to alert on the n8n process spawning shell processes or network utilities like curl and wget.
  3. Audit User Permissions: Regularly audit which users have permission to create and edit workflows in n8n. Any user with these permissions can exploit this vulnerability, so access should be tightly controlled.

Remediation Steps

Immediate action is required to mitigate this critical risk.

  1. Patch Immediately: The primary and most effective remediation is to upgrade all n8n instances to a patched version (1.123.17 or 2.5.2). This is a direct application of M1051 - Update Software.
  2. Restrict Permissions (Temporary Mitigation): If patching is not immediately possible, as a temporary measure, revoke workflow creation and editing permissions from all non-essential and untrusted users. This limits the number of accounts that could be used to exploit the flaw. This aligns with the principle of least privilege (M1026 - Privileged Account Management).
  3. Rotate Credentials: After patching, it is highly recommended to rotate all credentials, API keys, and secrets stored in the n8n environment as a precaution against prior, undetected compromise.

Timeline of Events

1
February 6, 2026
This article was published

MITRE ATT&CK Mitigations

Immediately update n8n to a patched version to remediate the vulnerability.

Mapped D3FEND Techniques:

Apply the principle of least privilege by restricting workflow editing permissions to only trusted administrators.

Mapped D3FEND Techniques:

While the internal sandbox failed, running n8n in a container with a restrictive seccomp profile could provide an additional layer of defense.

Mapped D3FEND Techniques:

D3FEND Defensive Countermeasures

The only definitive way to mitigate the critical risk posed by CVE-2026-25049 is to upgrade all n8n instances to a patched version (1.123.17 or 2.5.2). This vulnerability allows a complete bypass of the platform's primary security control—the sandbox—making it an urgent priority. Due to the potential for full server compromise and theft of all connected credentials, this update should be treated as an emergency change. Organizations should leverage their patch management systems to identify all n8n deployments and push the update immediately. After patching, a full credential rotation for all services connected to n8n is strongly recommended to invalidate any secrets that may have been stolen prior to the update.

To detect potential exploitation of CVE-2026-25049, security teams must use Process Analysis on the n8n host server. An EDR solution should be configured to monitor the n8n process and its children. A high-fidelity detection rule should be created to alert any time the n8n parent process spawns a shell (sh, bash, cmd.exe, powershell.exe) or a network utility (curl, wget, nc). Under normal operation, the n8n application should never create such child processes. This behavior is a strong indicator of a successful sandbox escape and subsequent command execution. Correlating this alert with network logs showing new, unexpected outbound connections from the server can further confirm a compromise and help identify a C2 channel.

Sources & References

Critical Vulnerability in n8n Platform
Cyber Security Agency of Singapore (csa.gov.sg) February 6, 2026
Critical N8n Sandbox Escape Could Lead to Server Compromise
SecurityWeek (securityweek.com) February 5, 2026

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Tags

CVE-2026-25049n8nRCEsandbox escapeworkflow automationsupply chain

📢 Share This Article

Help others stay informed about cybersecurity threats

Continue Reading