CVE-2026-118678 in n8n
Summary
by MITRE • 10/28/2026
n8n before 2.41.4 and 2.42.x before 2.42.1 contains a prototype pollution vulnerability that allows low-privileged users to alter built-in object behaviour by saving workflows with specially named connection keys. Attackers can add keys such as __proto__ to workflow connections, which the periodic history compaction task processes, causing logins and writes to fail with server errors.
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 10/28/2026
The vulnerability identified in n8n versions prior to 2.41.4 and within the 2.42.x series before version 2.42.1 represents a significant security flaw rooted in improper handling of object properties during workflow serialization and deserialization processes. This issue is classified as Prototype Pollution, which aligns with CWE-1325 under Common Weakness Enumeration standards for incorrect comparison operations involving prototype chains. The core technical failure occurs when the application accepts user-supplied input within workflow connection configurations without adequately sanitizing or validating property names against reserved JavaScript object keys such as _proto_, constructor, and prototype. By injecting these specific strings into connection key fields, an attacker can manipulate the internal state of objects used by the n8n platform to manage workflows and credentials.
The operational mechanism of this exploit relies on the periodic history compaction task within the application architecture. When a workflow containing specially crafted keys is saved, it enters the system's storage layer. Subsequently, when the background process responsible for compacting historical data runs, it attempts to merge or update object states using standard JavaScript assignment methods that do not check for prototype chain pollution. This allows the malicious payload to alter the behavior of built-in objects across the application context. The immediate consequence is a denial of service condition where legitimate users experience failures in authentication and write operations. Specifically, login processes may fail due to corrupted session or user object structures, while data persistence mechanisms break down as internal configuration objects are overwritten with unexpected values derived from the polluted prototype chain.
From an attack perspective, this vulnerability allows low-privileged users to impact system stability without requiring administrative access, which escalates the risk profile significantly in multi-user environments. The ability to disrupt core functionalities like login and writing data effectively renders the automation platform unusable for its intended purpose until the compromised state is resolved or services are restarted. This aligns with MITRE ATT&CK technique T1496, Resource Hijacking, as the attacker consumes system resources through error states and potentially causes service degradation that impacts availability. Furthermore, because prototype pollution can sometimes lead to remote code execution depending on how affected objects are utilized in subsequent operations, this flaw poses a latent risk for more severe compromises if other parts of the application chain rely on the polluted properties without validation.
Mitigation strategies must prioritize immediate version upgrades to n8n 2.41.4 or later, and specifically to version 2.42.1 or newer where these input validation checks have been implemented. In addition to upgrading, administrators should review workflow configurations for any existing instances of suspicious property names that might have persisted in the database prior to patching. Implementing strict allow-lists for connection key naming conventions at the API level can further prevent such injections from entering the system state. Regular security audits focusing on object manipulation patterns and enforcing JSON schema validation against known dangerous keys are essential practices to maintain resilience against prototype pollution attacks in JavaScript-based automation tools.