Summary
n8n-MCP contained an improper tenant isolation flaw that allowed one authenticated tenant to access and manipulate workflow backup data belonging to other tenants.
In HTTP mode with multi-tenancy enabled, this cross-tenant exposure became risky wherever sensitive workflow definitions, credential references, or authorization headers were stored in version history snapshots.
Affected context
This vulnerability occurs in n8n-MCP when it runs in HTTP mode with multi-tenancy explicitly enabled (ENABLE_MULTI_TENANT=true) and workflow version history backups are stored locally.
Under those conditions, backup storage and lookup logic did not reliably scope access by tenant, so authenticated users could interact with version snapshots beyond their own tenancy boundary.
Exploit preconditions
- Attack surface: n8n-MCP HTTP interface for accessing workflow version history backups
- Required access: Authenticated access as any tenant in a multi-tenant deployment
- Trigger point: Requests to list, read, or manage workflow version snapshots and backup artifacts
- Why exploitation is possible: Authorization checks on backup storage did not enforce tenant-level isolation, allowing identifiers or paths to be reused across tenants without validation
Why this happens
The underlying bug is an access control failure in multi-tenant data handling that maps to CWE-639 (Authorization Bypass Through User-Controlled Key) and CWE-862 (Missing Authorization).
Backup records for workflow version history were stored and retrieved in a way that did not consistently bind resources to the requesting tenant context.
As a result, the system relied on identifiers or shared storage paths without enforcing a per-tenant authorization check, allowing one tenant to read, delete, or destroy another tenant's workflow backups, including node definitions and associated credential references.
Potential impact
- An authenticated tenant may read other tenants' workflow version history and node configurations
- An attacker could obtain credential references, authorization headers, or integration endpoints embedded in workflows
- Malicious tenants can delete or destroy other tenants' stored backups, causing data loss and operational disruption
- Compromise of confidentiality and integrity across tenants in the shared environment
General mitigation guidance
Effective mitigation focuses on enforcing strict tenant isolation and robust authorization checks around all multi-tenant resources.
Recommended patterns include:
- Consistently binding workflow backups and version snapshots to a tenant identifier, and validating that identifier on every access and mutation
- Using storage segmentation per tenant (separate namespaces, directories, or logical partitions) to reduce accidental cross-tenant exposure
- Implementing centralized authorization middleware so that resource-level checks are not bypassed by direct calls to storage or lookup code
- Minimizing sensitive data stored in workflow backups, such as raw authorization headers, and favoring indirection via secure credential stores
- Applying least-privilege principles so tenants can manage only their own workflows and backups, without generic administrative capabilities
How teams detect issues like this
Detection typically relies on reviewing both design and implementation of multi-tenant data access paths.
Useful approaches include:
- Static analysis rules that flag resource lookups and deletions lacking explicit tenant scoping or authorization checks
- Code review practices that focus on multi-tenant boundaries, ensuring every workflow, backup, and credential-related operation validates tenant identity
- Centralized logging for backup access and deletion operations, with anomaly detection for cross-tenant patterns (e.g., one tenant accessing many disparate tenant IDs)
- Security policy enforcement that requires per-tenant namespaces and prohibits shared storage without strict, verified access-control layers
Automated code scanning and configuration review tools can help surface insecure data-access patterns before deployment.

