CVE-2026-65595: n8n before 2.29.8 and 2.30.1 Privilege Escalation via Token Exchange

Published Jul 22, 2026
·
Updated

Impact

JWTs issued through the Token Exchange module were assigned all Public API key scopes, regardless of the acting user's actual role. A low-privileged user who could obtain a valid external JWT trusted by a configured issuer could therefore use the resulting access token to invoke administrator-only Public API operations, such as role escalation, user creation, and user deletion.

The issue only affects instances where the Token Exchange feature and the Public API are enabled (N8NTOKENEXCHANGEENABLED=true, N8NENVFEATTOKENEXCHANGE=true) and the attacker can obtain an external JWT accepted by a configured trusted key. Role escalation additionally requires an Advanced Permissions license; Community Package installation additionally requires N8NCOMMUNITYPACKAGESENABLED=true and N8NUNVERIFIEDPACKAGESENABLED=true.

Patches

The issue has been fixed in n8n version 2.30.1 and 2.29.8. Users should upgrade to this version or later to remediate the vulnerability.

Workarounds

If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Disable the Token Exchange feature by setting N8NTOKENEXCHANGEENABLED=false or N8NENVFEATTOKENEXCHANGE=false. - If Token Exchange cannot be disabled, restrict Public API access at the network level to trusted clients only. - Disable unverified Community Package installation by setting N8NUNVERIFIEDPACKAGESENABLED=false to eliminate the code execution path.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Other sources

n8n before 2.30.1 and 2.29.8 assigns all Public API key scopes to JWTs issued through the Token Exchange module regardless of the acting user's role. On instances where the Token Exchange feature and Public API are enabled, a low-privileged user who can obtain a valid external JWT trusted by a configured issuer can use the resulting access token to invoke administrator-only Public API operations such as role escalation, user creation, and user deletion (role escalation requires an Advanced Permissions license), and, when unverified Community Package installation is enabled, achieve remote code execution.

MITRE

Affected Software

7 affected componentsFixes available
n8n n8n>2.29.7<=2.30.1
npm/n8n<2.29.8
2.29.8
npm/n8n>=2.30.0<2.30.1
2.30.1
n8n N8n Node.js<2.29.8
n8n N8n Node.js<2.29.8
n8n N8n Node.js=2.30.0
n8n N8n Node.js=2.30.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/n8n to a version that resolves this vulnerability.

    Fixed in 2.29.8
  2. Upgrade

    Upgrade npm/n8n to a version that resolves this vulnerability.

    Fixed in 2.30.1
  3. Upgrade

    Upgrade n8n to a version that resolves this vulnerability.

    Fixed in 2.29.8
  4. Upgrade

    Upgrade n8n to a version that resolves this vulnerability.

    Fixed in 2.30.1
  5. Configuration

    Disable the Token Exchange feature by setting N8N_TOKEN_EXCHANGE_ENABLED=false (or use N8N_ENV_FEAT_TOKEN_EXCHANGE=false, if that is the setting in use).

    n8n N8N_TOKEN_EXCHANGE_ENABLED = false
  6. Configuration

    Disable unverified Community Package installation by setting N8N_UNVERIFIED_PACKAGES_ENABLED=false to eliminate the code execution path.

    n8n N8N_UNVERIFIED_PACKAGES_ENABLED = false
  7. Compensating control

    If Token Exchange cannot be disabled, restrict Public API access at the network level to trusted clients only.

Event History

Jul 22, 2026
CVE Published
via MITRE·11:21 AM
Data Sourced
via MITRE·11:21 AM
DescriptionWeakness
Data Sourced
via NVD·12:18 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:18 PM
Affected Software
Advisory Published
via GitHub·10:00 PM
Data Sourced
via GitHub·10:00 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-65595?

CVE-2026-65595 has a high severity rating of 8.9 according to CVSS.

2

How do I fix CVE-2026-65595?

To fix CVE-2026-65595, you should upgrade n8n to version 2.30.1 or later.

3

What type of vulnerability is CVE-2026-65595?

CVE-2026-65595 is a privilege escalation vulnerability affecting n8n.

4

Who is affected by CVE-2026-65595?

CVE-2026-65595 affects users of n8n versions prior to 2.30.1.

5

What is the impact of CVE-2026-65595?

CVE-2026-65595 allows low-privileged users to obtain unauthorized administrative access via token exchange.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203