CVE-2026-59259 Overview
CVE-2026-59259 is a permission bypass vulnerability in n8n, an open-source workflow automation platform. The flaw stems from a mismatch between the static validation check and the runtime expression engine when processing external secret references in credentials. An authenticated user with credential create or update permissions, but lacking the externalSecret:list scope, can embed external secret references into credentials in forms that bypass static validation. These references resolve at workflow execution time, exposing secret values the user is not authorized to access. The issue affects n8n instances where an external secrets provider is configured and Advanced Permissions are enabled [CWE-639].
Critical Impact
Authenticated users can retrieve sensitive external secrets they lack authorization to view, undermining the isolation guarantees of the Advanced Permissions model.
Affected Products
- n8n versions prior to 1.123.61
- n8n versions prior to 2.27.4
- n8n version 2.28.0 (community and enterprise editions)
Discovery Timeline
- 2026-07-15 - CVE-2026-59259 published to NVD
- 2026-07-16 - Last updated in NVD database
Technical Details for CVE-2026-59259
Vulnerability Analysis
n8n supports external secrets providers that allow workflow credentials to reference secrets stored in external vaults. Access to these secrets is governed by the externalSecret:list scope under the Advanced Permissions model. The permission check relies on static analysis of credential payloads to detect embedded expressions referencing external secrets. When a match is found, the system denies save operations for users without the required scope.
The vulnerability arises because the static validator and the runtime expression parser interpret input differently. An attacker can craft external secret references using syntactic forms the static validator does not recognize as expressions but the runtime engine still resolves. As a result, credentials pass the authorization gate at save time, then dereference external secrets when workflows execute.
Root Cause
The root cause is a parser differential [CWE-639] between the credential validation layer and the expression evaluation engine. Static validation uses a narrower detection heuristic than the runtime evaluator, creating an authorization gap. Any input that the runtime engine treats as an external secret expression, but the validator does not, becomes an authorization bypass primitive.
Attack Vector
Exploitation requires an authenticated user with credential create or update permissions. The attacker embeds an external secret reference into a credential field using a form that evades the static check. When the user or any workflow triggers execution with that credential, the runtime engine resolves the reference and injects the plaintext secret into the outbound request or log output. The attacker can then observe the resolved value through workflow execution results, logs, or downstream HTTP calls under their control.
No verified exploit code has been published. See the GitHub Security Advisory GHSA-jp7m-xcgx-57qm and the VulnCheck Security Advisory for technical details.
Detection Methods for CVE-2026-59259
Indicators of Compromise
- Credential objects containing external secret expression syntax created or updated by users lacking the externalSecret:list scope.
- Workflow execution logs referencing external secret keys not previously accessible to the executing user.
- Outbound HTTP requests from n8n workers containing resolved secret values in query strings, headers, or bodies destined for attacker-controlled hosts.
Detection Strategies
- Audit the n8n credentials database for expression strings referencing the external secrets provider namespace, cross-referenced against user role assignments.
- Review workflow execution history for credentials modified by users without the externalSecret:list scope, especially where the workflow performs outbound HTTP calls.
- Enable and inspect n8n audit logs for credential create and update events immediately followed by execution runs against those credentials.
Monitoring Recommendations
- Forward n8n application and audit logs to a centralized SIEM and alert on credential modifications by non-privileged roles.
- Monitor egress traffic from n8n execution workers for anomalous destinations that could receive exfiltrated secrets.
- Track expression parser errors and successful external secret resolutions correlated with user identity and role scope.
How to Mitigate CVE-2026-59259
Immediate Actions Required
- Upgrade n8n to version 1.123.61, 2.27.4, or 2.28.1 as applicable to your release channel.
- Rotate any external secrets that may have been exposed to users lacking the externalSecret:list scope since the external secrets provider was configured.
- Review the assigned scopes for all users with credential create or update permissions and remove unnecessary privileges.
Patch Information
n8n has released fixed versions 1.123.61, 2.27.4, and 2.28.1. The patches align the static credential validator with the runtime expression engine so that all forms recognized by the evaluator are also enforced by the authorization check. Refer to the GitHub Security Advisory GHSA-jp7m-xcgx-57qm for release details.
Workarounds
- Disable the external secrets provider integration until the instance is patched if operationally feasible.
- Restrict credential create and update permissions to trusted administrators who already hold the externalSecret:list scope.
- Disable Advanced Permissions temporarily, accepting the coarser access model, on instances where patching cannot be applied immediately.
# Upgrade n8n via npm to a patched release
npm install -g n8n@1.123.61
# Or pull the patched Docker image
docker pull n8nio/n8n:2.28.1
docker stop n8n && docker rm n8n
docker run -d --name n8n -p 5678:5678 n8nio/n8n:2.28.1
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

