CVE-2026-65591 in n8n
Summary
by MITRE • 07/22/2026
n8n contains a sanitizer bypass vulnerability in the legacy expression evaluator's computed-member handler. An authenticated user with workflow create or modify permissions can craft a malicious expression to bypass the sanitizer and achieve host-level code execution as the n8n process. The legacy expression engine is the default in affected versions. Fixed in n8n 1.123.64, 2.29.8, and 2.30.1.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 07/22/2026
The vulnerability identified in n8n represents a critical security flaw within the legacy expression evaluator's computed-member handler that enables authenticated attackers to bypass input sanitization mechanisms. This issue affects systems where the legacy expression engine remains active as the default configuration, creating a pathway for privilege escalation and remote code execution. The vulnerability specifically targets the sanitizer component responsible for validating user inputs within workflow expressions, allowing malicious actors to craft carefully constructed payloads that circumvent security controls designed to prevent arbitrary code execution.
The technical implementation of this flaw occurs within the legacy expression evaluation system where computed member access handlers fail to properly sanitize input parameters before processing. When an authenticated user with workflow creation or modification privileges submits a malicious expression containing crafted syntax elements, the sanitizer's validation logic can be bypassed through specific parsing sequences that exploit gaps in the input validation process. This allows attackers to inject arbitrary code that executes with the privileges of the n8n process running on the host system, potentially enabling full compromise of the underlying infrastructure.
The operational impact of this vulnerability extends beyond simple privilege escalation to encompass complete system compromise capabilities. Since the attack requires only workflow creation or modification permissions rather than administrative access, it can be exploited by users with relatively limited privileges within the platform. The execution occurs at the host level with the same privileges as the n8n service, potentially allowing attackers to access sensitive data, modify system configurations, install additional malware, or establish persistence mechanisms. The default activation of the legacy expression engine in affected versions means that vulnerable installations are likely to be numerous across various deployment scenarios.
Mitigation strategies should prioritize immediate upgrade to patched versions 1.123.64, 2.29.8, or 2.30.1 where the sanitizer bypass has been addressed through enhanced input validation and improved expression parsing logic. Organizations should also consider implementing additional controls such as workflow execution monitoring, input validation at multiple layers, and privilege separation mechanisms to reduce the attack surface. The fix addresses the underlying CWE-74 error condition related to improper neutralization of special elements in a code context, which aligns with common ATT&CK techniques for code injection and privilege escalation. Administrators should conduct thorough vulnerability assessments across all n8n installations to identify and remediate affected systems before potential exploitation occurs.
This vulnerability demonstrates the critical importance of proper input sanitization in workflow automation platforms where user inputs can directly influence system behavior. The legacy expression engine's continued default activation despite known security issues highlights the need for comprehensive security testing and timely patch management processes. Organizations should implement robust monitoring for unusual workflow execution patterns and maintain current threat intelligence to detect potential exploitation attempts targeting similar vulnerabilities in their automation infrastructure.