{"id":"CVE-2026-65595","aliases":["EUVD-2026-47639","GHSA-777w-rpr6-c52h","GHSA-wq64-hcrf-8m56","ROOT-APP-NPM-CVE-2026-65595"],"status":"published","title":"n8n before 2.29.8 and 2.30.1 Privilege Escalation via Token Exchange","description":"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.","severity":{"version":"4.0","score":8.9,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00693,"percentile":0.53232,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-269"],"published":"2026-07-22T11:21:43Z","modified":"2026-10-31T02:30:21Z","fixes":[{"ecosystem":"npm","package":"n8n","fixed_in":["2.30.1","2.29.8"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"n8n","fixed_in":["2.19.3-aikido.9","2.19.3-aikido.10","2.19.3-aikido.11","2.19.3-aikido.12","2.19.3-aikido.13","2.19.3-aikido.14","2.19.3-aikido.15"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/n8n","fixed_in":["2.19.3-root.io.9","2.19.3-root.io.10","2.19.3-root.io.11","2.19.3-root.io.12","2.19.3-root.io.13","2.19.3-root.io.14","2.19.3-root.io.15"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.30.0"},{"fixed":"2.30.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.29.8"}]}]},{"source":"osv","ecosystem":"npm","package":"n8n","ranges":[{"type":"SEMVER","events":[{"introduced":"2.30.0"},{"fixed":"2.30.1"}]}]},{"source":"osv","ecosystem":"npm","package":"n8n","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.29.8"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.19.3-aikido.9"},{"fixed":"2.19.3-aikido.10"},{"fixed":"2.19.3-aikido.11"},{"fixed":"2.19.3-aikido.12"},{"fixed":"2.19.3-aikido.13"},{"fixed":"2.19.3-aikido.14"},{"fixed":"2.19.3-aikido.15"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.19.3-root.io.9"},{"fixed":"2.19.3-root.io.10"},{"fixed":"2.19.3-root.io.11"},{"fixed":"2.19.3-root.io.12"},{"fixed":"2.19.3-root.io.13"},{"fixed":"2.19.3-root.io.14"},{"fixed":"2.19.3-root.io.15"}]}]}],"products":[{"vendor":"n8n","product":"n8n"},{"vendor":"n8n-io","product":"n8n"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-777w-rpr6-c52h","tags":["vendor-advisory","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/n8n-before-privilege-escalation-via-token-exchange","tags":["third-party-advisory","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65595","tags":["advisory"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.29.8","tags":["web"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.30.1","tags":["web"]},{"url":"https://github.com/advisories/GHSA-777w-rpr6-c52h"},{"url":"https://github.com/advisories/GHSA-wq64-hcrf-8m56"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65595.json","tags":["advisory"]},{"url":"https://github.com/n8n-io/n8n","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-65595","title":"n8n before 2.29.8 and 2.30.1 Privilege Escalation via Token Exchange","description":"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.","status":"published","published":"2026-07-22T11:21:43.411Z","modified":"2026-10-29T21:16:25.323Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T13:37:13.934727Z"}],"euvd":[{"id":"EUVD-2026-47639","description":"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.","status":"published","published":"2026-07-22T11:21:43Z","modified":"2026-10-29T21:16:25Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"updated_at":"2026-11-02T16:59:13.894662Z"}],"ghsa":[{"id":"GHSA-777w-rpr6-c52h","title":"n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs","description":"## Impact\n\nJWTs 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.\n\nThe issue only affects instances where the Token Exchange feature and the Public API are enabled (N8N_TOKEN_EXCHANGE_ENABLED=true, N8N_ENV_FEAT_TOKEN_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 `N8N_COMMUNITY_PACKAGES_ENABLED=true` and `N8N_UNVERIFIED_PACKAGES_ENABLED=true`.\n\n## Patches\n\nThe 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.\n\n## Workarounds\n\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Disable the Token Exchange feature by setting `N8N_TOKEN_EXCHANGE_ENABLED=false` or `N8N_ENV_FEAT_TOKEN_EXCHANGE=false`.\n- If Token Exchange cannot be disabled, restrict Public API access at the network level to trusted clients only.\n- Disable unverified Community Package installation by setting `N8N_UNVERIFIED_PACKAGES_ENABLED=false` to eliminate the code execution path.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","status":"published","published":"2026-07-22T22:00:07Z","modified":"2026-07-22T22:00:08Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T14:40:51.375752Z"},{"id":"GHSA-wq64-hcrf-8m56","title":"Duplicate Advisory: n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-777w-rpr6-c52h. This link is maintained to preserve external references.\n\n## Original Description\n\nn8n 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.","status":"withdrawn","published":"2026-07-22T12:32:17Z","modified":"2026-07-22T21:59:49Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T14:40:51.375752Z"}],"nvd":[{"id":"CVE-2026-65595","description":"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.","status":"published","published":"2026-07-22T12:18:19.66Z","modified":"2026-10-29T20:17:32.693Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T14:12:32.089897Z"}],"osv":[{"id":"CVE-2026-65595","title":"n8n before 2.29.8 and 2.30.1 Privilege Escalation via Token Exchange","description":"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.","status":"published","published":"2026-07-22T11:21:43.411Z","modified":"2026-10-31T02:30:21.380170114Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T15:45:14.096824Z"},{"id":"GHSA-777w-rpr6-c52h","title":"n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs","description":"## Impact\n\nJWTs 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.\n\nThe issue only affects instances where the Token Exchange feature and the Public API are enabled (N8N_TOKEN_EXCHANGE_ENABLED=true, N8N_ENV_FEAT_TOKEN_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 `N8N_COMMUNITY_PACKAGES_ENABLED=true` and `N8N_UNVERIFIED_PACKAGES_ENABLED=true`.\n\n## Patches\n\nThe 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.\n\n## Workarounds\n\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Disable the Token Exchange feature by setting `N8N_TOKEN_EXCHANGE_ENABLED=false` or `N8N_ENV_FEAT_TOKEN_EXCHANGE=false`.\n- If Token Exchange cannot be disabled, restrict Public API access at the network level to trusted clients only.\n- Disable unverified Community Package installation by setting `N8N_UNVERIFIED_PACKAGES_ENABLED=false` to eliminate the code execution path.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","status":"published","published":"2026-07-22T22:00:07Z","modified":"2026-07-22T22:26:48.245542Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T15:46:40.657155Z"},{"id":"GHSA-wq64-hcrf-8m56","title":"Duplicate Advisory: n8n: Privilege Escalation and Code Execution via Full Public API Key Scope Assignment to Token Exchange JWTs","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-777w-rpr6-c52h. This link is maintained to preserve external references.\n\n## Original Description\n\nn8n 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.","status":"withdrawn","published":"2026-07-22T12:32:17Z","modified":"2026-07-22T22:16:06.797362821Z","cvss":[{"version":"4.0","score":8.9,"vector":"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","level":"high"}],"cwes":["CWE-269"],"updated_at":"2026-11-02T15:46:58.767335Z"},{"id":"ROOT-APP-NPM-CVE-2026-65595","title":"CVE-2026-65595 in n8n - Patched by Root","description":"Root has patched CVE-2026-65595 in the n8n package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-10-06T03:42:47Z","modified":"2026-10-06T04:15:05.230458031Z","updated_at":"2026-11-02T15:53:27.649662Z"}]}}
