Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-65595

n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs
Back to all
CVE

CVE-2026-65595

n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs

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, N8NENVFEATTOKEN_EXCHANGE=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 N8NCOMMUNITYPACKAGES_ENABLED=true and N8NUNVERIFIEDPACKAGES_ENABLED=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 N8NTOKENEXCHANGE_ENABLED=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 N8NUNVERIFIEDPACKAGES_ENABLED=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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.9
-
4.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
9.9
-
3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Related Resources

No items found.

References

https://github.com/n8n-io/n8n/security/advisories/GHSA-777w-rpr6-c52h, https://nvd.nist.gov/vuln/detail/CVE-2026-65595, https://github.com/n8n-io/n8n, https://github.com/n8n-io/n8n/releases/tag/n8n@2.29.8, https://github.com/n8n-io/n8n/releases/tag/n8n@2.30.1, https://www.vulncheck.com/advisories/n8n-before-privilege-escalation-via-token-exchange

Severity

9.9

CVSS Score
0
10

Basic Information

Base CVSS
9.9
EPSS Probability
0.0048%
EPSS Percentile
0.40007%
Introduced Version
2.30.0,2.19.0,2.17.0
Fix Available
2.30.1,2.29.8

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading