<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Jwt-Exploitation - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/jwt-exploitation/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 22 Jul 2026 22:02:39 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/jwt-exploitation/feed.xml" rel="self" type="application/rss+xml"/><item><title>n8n Privilege Escalation and Code Execution via Flawed JWT Scope Assignment (CVE-2026-65595)</title><link>https://feed.craftedsignal.io/briefs/2026-07-n8n-privilege-escalation/</link><pubDate>Wed, 22 Jul 2026 22:02:39 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-n8n-privilege-escalation/</guid><description>A critical vulnerability, CVE-2026-65595, in n8n's Token Exchange module allows low-privileged users to achieve privilege escalation and potential code execution by exploiting incorrect Public API key scope assignments to JWTs, enabling administrative operations.</description><content:encoded><![CDATA[<p>A high-severity vulnerability, identified as CVE-2026-65595, has been discovered in n8n versions prior to 2.30.1 and 2.29.8. This flaw resides within the Token Exchange module, where JSON Web Tokens (JWTs) issued via this mechanism are erroneously assigned all Public API key scopes, irrespective of the authenticating user's actual permissions. This critical misconfiguration allows a low-privileged attacker, who successfully obtains a valid external JWT trusted by a configured issuer, to exchange it for an overly permissive n8n access token. With this escalated token, the attacker can then invoke administrator-only Public API operations, potentially leading to full privilege escalation within the n8n instance and even arbitrary code execution if the Community Packages feature is enabled. The issue impacts n8n instances with both Token Exchange (<code>N8N_TOKEN_EXCHANGE_ENABLED=true</code>) and the Public API enabled.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker, initially possessing low privileges, obtains a valid external JWT that is trusted by a configured issuer within the target n8n instance.</li>
<li>The attacker sends a request to the n8n instance's Token Exchange module, presenting the valid external JWT for exchange.</li>
<li>The n8n system processes the token exchange, and due to CVE-2026-65595, mistakenly assigns all available Public API key scopes to the newly issued internal access token.</li>
<li>The attacker receives the over-privileged internal JWT, which now grants them full administrative access to the Public API, bypassing their original low-privileged role.</li>
<li>Using this compromised token, the attacker performs administrator-only Public API operations, such as escalating roles for existing users, creating new administrative user accounts, or deleting users.</li>
<li>If n8n's Community Packages feature is enabled (<code>N8N_COMMUNITY_PACKAGES_ENABLED=true</code> and <code>N8N_UNVERIFIED_PACKAGES_ENABLED=true</code>), the attacker can leverage their administrative privileges.</li>
<li>The attacker installs and executes unverified or malicious packages through the Public API.</li>
<li>This leads to arbitrary code execution on the underlying server hosting the n8n instance, achieving full system compromise.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows a low-privileged user to achieve full privilege escalation within an affected n8n instance, gaining administrative control. If successful, an attacker can perform actions typically reserved for administrators, including altering user roles, creating new administrative accounts, or deleting existing users. In scenarios where the instance also has the Community Packages feature enabled, this can further lead to remote code execution, granting the attacker arbitrary control over the host system. While the number of specific victims is not public, any organization using affected n8n versions with the Token Exchange and Public API features enabled is at risk. Role escalation impact is greater for instances with an Advanced Permissions license.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch CVE-2026-65595 immediately:</strong> Upgrade all n8n instances to version 2.30.1, 2.29.8, or later to remediate the vulnerability.</li>
<li><strong>Disable Token Exchange as a workaround:</strong> If immediate patching is not possible, disable the Token Exchange feature by setting <code>N8N_TOKEN_EXCHANGE_ENABLED=false</code> or <code>N8N_ENV_FEAT_TOKEN_EXCHANGE=false</code> in your n8n environment configuration.</li>
<li><strong>Restrict Public API access:</strong> As a temporary mitigation, restrict Public API access at the network level to only trusted clients.</li>
<li><strong>Disable unverified Community Package installation:</strong> To eliminate the code execution path, set <code>N8N_UNVERIFIED_PACKAGES_ENABLED=false</code> in your n8n environment configuration.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>privilege-escalation</category><category>code-execution</category><category>vulnerability</category><category>jwt-exploitation</category></item></channel></rss>