CVE-2026-25049 – Critical Remote Code Execution Vulnerability in n8n
A critical vulnerability identified as CVE-2026-25049 has been disclosed in the open-source automation platform n8n, which allows unauthenticated attackers to execute arbitrary code remotely. This vulnerability affects n8n’s expression system, where improper sanitization leads to a sandbox escape, enabling an attacker to bypass security restrictions and gain control of the server. The flaw impacts versions prior to n8n 2.5.2 and 1.123.17.
Technical Breakdown: How the Exploit Works
The vulnerability stems from insufficient validation within n8n’s expression parser, which processes dynamic expressions used within workflows. The expression system allows users to input various types of data for dynamic execution, but it fails to properly handle certain input types during runtime.
When users craft expressions, they can pass untrusted input data that contains malicious JavaScript code. Due to an issue with the TypeScript static analysis, which does not fully account for runtime execution, attackers can inject non-string values that bypass type checking. This causes the underlying sandbox, meant to restrict potentially harmful code execution, to fail.
As a result, the attacker’s malicious code is executed with the same privileges as the n8n server process, leading to Remote Code Execution. This can allow attackers to:
- Gain access to sensitive system files.
- Execute arbitrary shell commands.
- Exfiltrate data from databases or credential stores.
- Compromise the integrity of the system and escalate privileges.
Exploitability and Attack Vector
The flaw is particularly dangerous because it does not require authentication to exploit. Since n8n is often exposed to the internet for integration with third-party services, attackers can remotely execute code without needing to authenticate, making this vulnerability highly exploitable.
The impact is compounded by n8n’s widespread use for automating business-critical workflows, often integrating sensitive APIs, databases, and services. Attackers could potentially hijack an instance of n8n to execute malicious commands that disrupt operations, steal data, or spread to other systems within the network.
Mitigation: Patch Available, Update Immediately
To mitigate the risk, n8n has released patches in versions 2.5.2 and 1.123.17. The patched versions address the vulnerability by improving input sanitization and enforcing stricter runtime checks on the expression system. Users should upgrade to these versions immediately to protect their systems from exploitation.
| Package Name | Advisory | Version | Published (UTC) | Status | Severity |
|---|---|---|---|---|---|
| n8n | CVE-2026-25049 | <2.5.2, <1.123.17 | February 4, 2026 | Fixed | Critical |
| n8n | CVE-2026-25056 | <1.118.0, >2.0.0 < 2.4.0 | February 4, 2026 | Fixed | Critical |
| n8n | CVE-2026-25053 | <1.123.10, <2.5.0 | February 4, 2026 | Fixed | Critical |
| n8n | CVE-2026-25052 | <2.5.0, <1.123.18 | February 4, 2026 | Fixed | Critical |
| n8n | CVE-2026-25115 | < 2.4.8 | February 4, 2026 | Fixed | Critical |
| n8n | CVE-2026-25055 | <2.2.3 | February 4, 2026 | Fixed | High |
| n8n | CVE-2026-25054 | <2.2.0 | February 4, 2026 | Fixed | High |
| n8n | CVE-2026-25051 | <1.123.2 | February 4, 2026 | Fixed | High |
| n8n | GHSA-2xcx-75h9-vr9h | <1.121.0 | February 4, 2026 | Fixed | Moderate |
| n8n | CVE-2026-21893 | >= 0.187.0 <1.120.3 | February 4, 2026 | Fixed | Low |
Conclusion: A Wake-up Call for Secure Expression Parsing
CVE-2026-25049 highlights the importance of comprehensive runtime validation, especially in systems that process dynamic input from untrusted sources. While static analysis during development is essential, the n8n vulnerability demonstrates that runtime vulnerabilities can still persist if type safety is not properly enforced at every stage of execution.
Admins running vulnerable versions of n8n should apply the latest patches without delay. This vulnerability is a prime example of how even small oversights in expression evaluation can lead to catastrophic consequences in production environments.
No Comment! Be the first one.