n8n can run JavaScript in a user's browser when they open a crafted workflow
What this means
An attacker who can create or edit workflows in n8n can inject code that runs in the browser of anyone who opens that workflow. This code can steal session tokens, passwords, or other sensitive data from the victim's browser, or change what the victim sees on screen. If an n8n admin opens the malicious workflow, the attacker gains control over the entire n8n account.
SecurityElites Manager Brief: the decision in one minute
n8n workflows can contain malicious code that runs in a user's browser when opened. An attacker with workflow-creation access can steal data or take over accounts. You need to upgrade to a patched version as soon as possible.
| SecurityElites Fix-First Score | 43 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 30 days High severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform or infrastructure team that manages n8n deployment and updates. |
| Likely effort | About 30 minutes: check the current version, upgrade n8n to the fixed release, restart the service, and verify the new version is running. Testing the upgrade in a staging environment first could add an hour. |
Questions to ask your team or supplier
- Do we know which users can create or edit workflows in our n8n instance, and are they all trusted?
- Have we checked our existing workflows for suspicious `cachedResultUrl` values, and if so, what did we find?
- What is our n8n version today, and is it on the patched list (1.123.64+, 2.29.8+, or 2.30.1+)?
Message you can forward to the owning team
Security notice: n8n can run JavaScript in a user's browser when they open a crafted workflow (CVE-2026-65592)
Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.30.1 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-65592-n8n-can-run-javascript-in-a-users-browser-when/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01755What is at stake in your AI setup
- Chat history and prompts: an attacker could read or modify messages sent to AI agents via n8n, exposing internal reasoning or instructions.
- API keys for AI providers: stolen session tokens could allow the attacker to access stored credentials for OpenAI, Anthropic, or other AI services.
- Tools and systems connected to agents: the attacker could use the stolen session to redirect AI workflow actions to attacker-controlled systems or leak data from connected databases and APIs.
- Training or retrieval data: if workflows pull data for model fine-tuning or retrieval-augmented generation, an attacker with session access could exfiltrate or poison that data.
Who is exposed
- n8n instances where any user (not just admins) can create or edit workflows.
- Teams whose admins regularly open workflows created by other users or from untrusted sources.
- n8n instances running version 1.x before 1.123.64, any 2.0.0-rc.0 through 2.29.7, or 2.30.0.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | Every version before 1.123.64; 2.30.0 up to, but not including, 2.30.1; 2.0.0-rc.0 up to, but not including, 2.29.8 | 2.30.1 or later |
Each maintained branch has its own fixed version. Stay on your branch if you cannot jump to the newest: n8n 1.123.64, 2.29.8, 2.30.1.
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Is it being attacked | No known attacks and no public attack code when CISA last reviewed it |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | An ordinary user account |
| Does a person have to do something | Yes, a deliberate action by a user |
| How hard it is to do | Easy. It works reliably once the attacker can reach it |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | None |
| Can attackers automate it at scale | No, according to CISA. Each target needs manual work |
| How much control an attacker gains | Total control of the affected software, according to CISA |
Read from the official severity rating: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N
Kind of coding mistake
- CWE-79: script can be injected into a web page
If you cannot upgrade today
- Restrict workflow creation and editing permissions to only fully trusted administrators until you can upgrade.
- Audit all existing workflows for suspicious `cachedResultUrl` values containing non-HTTP(S) schemes, and delete or repair any found.
- Advise users not to open workflows from untrusted sources or users until the upgrade is complete.
Signs it may already have been used against you
- Check workflow JSON exports or the database for `cachedResultUrl` fields that contain schemes other than `http://` or `https://` (such as `javascript:`, `data:`, or `file:`).
- Look in browser developer tools (F12 > Console) for JavaScript errors or unexpected code execution when workflows are opened.
- Search n8n logs for unusual `window.open()` calls or ResourceLocator activity around the time a user reported strange behavior.
- If a user's browser session was compromised, check their account login history (Settings > Users > [user] > Login History) for logins from unexpected locations or times.
Log searches to start from
Find n8n workflow events with non-HTTP schemes in URLs (field names must be adapted to your logs)Elastic
source:"n8n" AND (cachedResultUrl:"javascript:*" OR cachedResultUrl:"data:*" OR cachedResultUrl:"file:*")Written with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.
SecurityElites Fix Guide: step by step
- Find your n8n versionLog in to your n8n instance as an admin. Go to Settings > About. Write down the version number shown. If you cannot access Settings, check the n8n logs or container/process details for the running version.
- Check if you are on a vulnerable versionCompare your version to the list: vulnerable if it is 1.x before 1.123.64, 2.0.0-rc.0 through 2.29.7, or 2.30.0. If your version is 1.123.64 or later, 2.29.8 or later, or 2.30.1 or later, you are already patched and can skip the remaining steps.
- Restrict workflow edits while you prepare to upgradeAs a temporary step, disable workflow creation and editing for all non-admin users. In n8n Settings > Users, adjust permissions so only trusted administrators can create or modify workflows. This reduces risk until the upgrade is complete.
- Audit workflows for suspicious contentIn your n8n database or via the n8n UI, look for workflows with `cachedResultUrl` values that do not start with `http://` or `https://` (for example, `javascript:`, `data:`, or `file:`). Export or screenshot any suspicious workflows and store them as evidence in case of investigation.
- Back up your n8n dataExport your workflows, credentials, and any custom code to a file or database dump. Follow your backup process for n8n (usually via the UI export or a database snapshot). Keep this backup safe in case the upgrade needs to be rolled back.
- Upgrade n8n to the fixed versionIf you are on version 1.x, upgrade to 1.123.64 or later. If you are on 2.0.0-rc.0 through 2.29.7, upgrade to 2.29.8 or later. If you are on 2.30.0, upgrade to 2.30.1 or later. Use your package manager (npm, Docker, etc.) to pull the new version and redeploy. See your n8n deployment method (npm, Docker, cloud) for exact steps.
- Restart n8n and verify the new versionAfter the package is updated, restart the n8n service or container. Wait for it to fully start (check logs for 'ready' or 'listening' messages). Log in and go to Settings > About to confirm the version is now 1.123.64, 2.29.8, 2.30.1 or later.
- Re-enable workflow creation if you had restricted itNow that the patch is installed, go back to Settings > Users and restore the workflow creation and editing permissions you had before. Test by having a regular user create or edit a simple workflow.
How to confirm it is fixed: Confirm the fix by logging in to n8n and checking Settings > About to verify the version is 1.123.64, 2.29.8, 2.30.1, or later.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@2.30.1
npm ls n8nCheck n8n version via npm (if installed as npm package)for this issue
npm list n8nCheck n8n version via Docker (if running in a container)for this issue
docker inspect <container-id> | grep -i versionA starting content security policy (nginx)general hardening
add_header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'self'" always;Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.
Let your AI coding assistant do the upgrade
Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.
Instruction for your coding assistant
You are helping me fix a security vulnerability (CVE-2026-65592) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n - n8n (npm): must be 2.30.1 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.SecurityElites Incident Drill: could your team handle this?
Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## n8n can run JavaScript in a user's browser when they open a crafted workflow (CVE-2026-65592)
**Severity:** High | **SE Fix-First Score:** 43/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01755 https://securityelites.com/ai-vulnerabilities/cve-2026-65592-n8n-can-run-javascript-in-a-users-browser-when/
### Why this matters
An attacker who can create or edit workflows in n8n can inject code that runs in the browser of anyone who opens that workflow. This code can steal session tokens, passwords, or other sensitive data from the victim's browser, or change what the victim sees on screen. If an n8n admin opens the malicious workflow, the attacker gains control over the entire n8n account.
### What to do
1. Find your n8n version
2. Check if you are on a vulnerable version
3. Restrict workflow edits while you prepare to upgrade
4. Audit workflows for suspicious content
5. Back up your n8n data
6. Upgrade n8n to the fixed version
7. Restart n8n and verify the new version
8. Re-enable workflow creation if you had restricted it
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-65592-n8n-can-run-javascript-in-a-users-browser-when/
### Done when
- [ ] n8n is at 2.30.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm the fix by logging in to n8n and checking Settings > About to verify the version is 1.123.64, 2.29.8, 2.30.1, or later.
- [ ] Logs were checked for signs of earlier use
SecurityElites Fix Tracker
Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.
Related vulnerabilities
In the same software
- n8n legacy expression engine allows code execution via JSON.stringify override High · CVE-2026-86083
- n8n OpenAI node bypasses domain restrictions on model search High · CVE-2026-86082
- n8n Git node can freeze the instance with a crafted path High · CVE-2026-86081
- n8n OAuth registration accepts unlimited field sizes, filling the database High · CVE-2026-86075
- n8n expression compiler can run arbitrary code through class field names High · CVE-2026-86076
- n8n Edit Fields node can crash the whole instance with a bad field name High · CVE-2026-72749
The same kind of mistake in other AI tools
- n8n HTML preview can run attacker scripts with user permissions High · CVE-2026-65597
- Flowise stores user messages without sanitizing them, letting attackers run scripts in admin browser Critical · CVE-2025-50538
Change history
- 22 Jul 2026: Made public
- 2 Dec 2026: Published
Official record
## Impact The Resource Locator passes the workflow-persisted `cachedResultUrl` to `window.open()` without scheme validation. When a victim opens the crafted workflow and interact with external links, the JavaScript payload runs in the victim's browser.## Patches The issue has been fixed in n8n versions 1.123.64, 2.29.8, and 2.30.1. Users should upgrade to one of these versions or later to remediate the vulnerability.## Workarounds If upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Restrict workflow creation and editing permissions to fully trusted users only. - Audit existing workflows for unexpected `cachedResultUrl` values containing non-HTTP(S) schemes.These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Weakness type: CWE-79
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-65592For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker
The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 2 Dec 2026. Read the vendor advisory before changing a production system.