CVE-2026-54311: n8n SQL Query Sandbox Pollution – Cross-User Data Leak
n8n versions before 2.25.7 and 2.26.2 contain a cross-user data leak vulnerability in the Merge node's SQL Query mode. An authenticated user can craft a malicious workflow that modifies the shared sandbox environment, poisoning it for all subsequent SQL queries executed by other users on the same instance. This means workflows belonging to different users or projects can inadvertently expose sensitive data to attackers who have created a polluted sandbox. The vulnerability requires authenticated access and only impacts multi-user deployments where multiple users can create workflows with the Merge node.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.7 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-488
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-25
NVD description (verbatim)
n8n is an open source workflow automation platform. Prior to 2.25.7 and 2.26.2, an authenticated user with permission to create or modify workflows could pollute the sandbox used by the Merge node's SQL Query mode. Because the sandbox context was cached and reused across all workflow executions on the instance, prototype mutations introduced by one user's workflow persist into subsequent Merge SQL executions belonging to other users or projects. This allowed a low-privileged attacker to intercept workflow data processed by other users on the same instance. This issue only affects multi-user n8n instances where more than one user has permission to create and execute workflows containing the Merge node in SQL Query mode. This vulnerability is fixed in 2.25.7 and 2.26.2.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from improper sandbox isolation in n8n's Merge node SQL Query execution engine. The sandbox context is cached globally and reused across workflow executions rather than being created fresh or properly isolated per-user or per-workflow. When an authenticated user executes a workflow containing a Merge node in SQL Query mode, prototype mutations and modifications to the sandbox object persist in the cached context. Subsequent executions by any user on the instance inherit this polluted state, allowing JavaScript prototype pollution techniques to leak or manipulate data flowing through SQL queries. The issue is rooted in CWE-488 (Exposure of Data Through Debug Information), reflecting the unintended exposure of execution context across trust boundaries.
Business impact
For organizations running multi-user n8n instances, this vulnerability poses a significant confidentiality risk. Any low-privileged user with workflow creation permissions can mount a passive data interception attack against colleagues' workflows without triggering alerts or requiring direct access to their workflows. This is particularly dangerous in environments where n8n coordinates sensitive data flows—such as finance, healthcare, or customer relationship management integrations—where workflow data may contain PII, credentials, or business-critical information. The attack leaves minimal forensic traces and affects all users sharing the instance after the initial pollution, making it difficult to detect or remediate retroactively.
Affected systems
n8n self-hosted and cloud deployments running versions prior to 2.25.7 (if on the 2.25.x branch) or 2.26.2 (if on the 2.26.x or later branches). The vulnerability only manifests in multi-user instances; single-user n8n deployments are unaffected because there is no cross-user data exposure path. Any n8n instance where two or more users have permission to create and execute workflows is at risk if they use the Merge node in SQL Query mode.
Exploitability
Exploitation requires valid n8n credentials and permission to create or modify workflows—conditions commonly met in collaborative automation environments. No user interaction is needed beyond the attacker creating and executing a malicious workflow. The attack is reliable once the sandbox is polluted; subsequent executions by other users will inherit the compromised state automatically. However, the attacker cannot directly exfiltrate data—they must observe side-channel effects or craft subsequent workflows to read polluted state. The barrier to exploitation is low for insiders but requires prior authentication, which CVSS reflects in the PR:L (low privilege required) rating.
Remediation
Upgrade to n8n 2.25.7 or later if running the 2.25.x branch, or to 2.26.2 or later if running 2.26.x and above. The fix implements proper sandbox isolation, likely by creating separate sandbox contexts per execution or invalidating the global cache between user/project boundaries. After patching, review access controls to ensure only trusted users have workflow creation permissions, and consider audit logging of workflow modifications for forensic analysis of potential historical exploitation.
Patch guidance
Apply the latest patch immediately: verify against the vendor advisory for your specific n8n branch version. Users on 2.25.x should update to 2.25.7; users on 2.26.x and later should update to 2.26.2 or the next stable release. Test the upgrade in a non-production environment first, as workflow execution behavior may change. No configuration changes are required post-patch; the fix is transparent to end-users. If you cannot patch immediately, restrict workflow creation permissions to a minimal trusted set of users and disable SQL Query mode in the Merge node until patched.
Detection guidance
Monitor n8n version and audit logs for workflow creation and modification events, particularly by low-privileged accounts. Look for suspicious Merge node SQL Query workflows that attempt prototype pollution or unusual data access patterns. Check for sudden changes in workflow behavior or unexpected data leakage incidents among users on the same instance. Network-based detection is limited because the attack is internal to n8n; focus on application-level logging of sandbox state changes if available. Forensic detection is difficult post-exploitation; prioritize preventive patching and access control.
Why prioritize this
This is a HIGH-severity vulnerability (CVSS 7.7) affecting a popular open-source automation platform widely used in enterprise integrations. The combination of high confidentiality impact, low access barriers for authenticated users, and silent exploitability without user interaction makes it a priority for multi-user instances. Although not yet on CISA's KEV catalog, the vulnerability affects supply-chain-critical infrastructure in some organizations. Patch immediately if your n8n deployment has multiple users with workflow creation rights.
Risk score, explained
CVSS 7.7 (HIGH) reflects: Attack Vector: Network (AV:N) — the instance is reachable over the network; Access Complexity: Low (AC:L) — no special conditions required; Privileges Required: Low (PR:L) — authenticated user required but no admin rights; User Interaction: None (UI:N) — the attack executes automatically; Scope: Changed (S:C) — the pollution affects other users and projects beyond the attacker's immediate context; Confidentiality: High (C:H) — sensitive workflow data is exposed; Integrity: None (I:N) — data is not modified, only read; Availability: None (A:N) — no denial of service. The 'Changed' scope is critical here, elevating severity beyond a simple data leak.
Frequently asked questions
Does this affect single-user n8n instances?
No. The vulnerability requires at least two users with workflow creation permissions on the same instance to create a cross-user data exposure path. Single-user deployments are not vulnerable because there is no second party to spy on.
Can I mitigate this without upgrading immediately?
Partially. Restrict workflow creation permissions to a small, trusted group of users. Disable or remove the Merge node's SQL Query mode from workflows until you can patch. Monitor audit logs closely. However, these measures do not eliminate the risk—upgrading is the only complete fix.
How can I tell if I've been exploited?
Post-exploitation forensics are challenging because the attack is silent and leaves no obvious log trail. Review workflow audit logs for suspicious Merge node SQL Query activities, unexpected workflow modifications, and any user data leakage reports. If you suspect compromise, audit all workflow execution data for the period since deployment.
What does 'sandbox pollution' mean in this context?
The Merge node's SQL execution engine uses a shared JavaScript sandbox environment cached across all workflow executions. An attacker modifies JavaScript objects in that sandbox (prototype pollution), and those modifications persist. Later executions inherit the polluted state, allowing the attacker to intercept or manipulate data flowing through other users' SQL queries without direct access to their workflows.
This analysis is based on the official CVE record and vendor advisory. CVSS scores and severity ratings are as published by NIST and the vendor. Patch version numbers should be verified against the official n8n advisory before deployment. SEC.co makes no warranty regarding the completeness or timeliness of this analysis. Organizations should conduct their own risk assessment and testing before applying patches. This document is for informational purposes and does not constitute legal or compliance advice. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46416MEDIUMMicrosoft UFO WebSocket Handler Session Isolation Flaw
- CVE-2026-9831MEDIUMExtreme Platform ONE API-Key Race Condition Allows Cross-Tenant Data Leakage
- CVE-2026-44790HIGHn8n Git Node Command Injection – Patching Guidance
- CVE-2026-45732HIGHn8n OAuth Credential Hijacking via Privilege Escalation
- CVE-2026-49444HIGHn8n Python Code Node Sandbox Escape – Arbitrary Code Execution
- CVE-2026-49465HIGHn8n Path Traversal Bypass in Git Node File Sandbox
- CVE-2026-54304HIGHn8n SecurityScorecard Credential Exfiltration
- CVE-2026-54308HIGHn8n Webhook Authentication Bypass in MicrosoftAgent365Trigger and StripeTrigger