n8n Edit Image node can write files outside its working directory
What this means
An authenticated user who can run workflows in n8n could write arbitrary files to the server, potentially overwriting configuration, stealing data, or taking over the n8n instance. This could lead to compromise of all workflows, credentials, and connected systems.
SecurityElites Manager Brief: the decision in one minute
A flaw in n8n's Edit Image node lets authenticated users write files anywhere on the server. You need to upgrade to a patched version immediately, as any workflow user can exploit this. If you cannot upgrade today, disable the Edit Image node.
| 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 instances. |
| Likely effort | About 15 to 30 minutes: check which n8n version you run, upgrade to a fixed version, and restart the service. Longer if you have many n8n instances or need to test workflows first. |
Questions to ask your team or supplier
- Which version of n8n are we running, and do we have a maintenance window to upgrade in the next 24 hours?
- Who has permission to create or edit workflows in our n8n instances, and have they used the Edit Image node recently?
- Do we have backups of our n8n database and workflows, and have we tested restoring from them?
Message you can forward to the owning team
Security notice: n8n Edit Image node can write files outside its working directory (CVE-2026-72762)
Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to n8n 2.32.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-72762-n8n-edit-image-node-can-write-files-outside-its/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01850What is at stake in your AI setup
- Workflow definitions and logic could be overwritten or corrupted by malicious files.
- Stored credentials and API keys for connected AI services or external systems could be replaced or deleted.
- Tools and systems connected to workflows could be misconfigured or disconnected if their integration files are modified.
Who is exposed
- n8n instances running version 1.123.66 or earlier.
- n8n instances running 2.0.0-rc.0 through 2.31.4.
- n8n instances running 2.32.0.
- Any team member with permission to create or edit workflows.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| n8n npm | Every version before 1.123.67; 2.32.0 up to, but not including, 2.32.1; 2.0.0-rc.0 up to, but not including, 2.31.5 | 2.32.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.67, 2.31.5, 2.32.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 | No. It works without anyone clicking or opening anything |
| How hard it is to do | Hard. It depends on conditions the attacker does not control |
| Risk of: data being read | High |
| Risk of: data or settings being changed | High |
| Risk of: the service being taken down | High |
| 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:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Kind of coding mistake
- CWE-73
If you cannot upgrade today
- Restrict n8n instance access to fully trusted users only by using authentication and role-based access control.
- Disable the Edit Image node by adding `n8n-nodes-base.editImage` to the `NODES_EXCLUDE` environment variable and restart n8n. This blocks all users from using the node but does not fully remediate the risk.
- These workarounds are temporary only and do not eliminate the vulnerability; upgrade as soon as possible.
Signs it may already have been used against you
- Check n8n execution logs for Edit Image node runs. Look for image format parameters with unusual or suspicious values.
- Search the file system for files created in unexpected locations (outside the n8n data or working directory) during the time when workflows with Edit Image were running.
- Review access logs and audit trails for n8n workflow executions that used the Edit Image node, especially by users who do not normally use that node.
- Look for file I/O errors or permission issues in n8n logs that may indicate failed attempts to write files outside the intended directory.
Log searches to start from
Edit Image node executions (adapt index and field names to your environment)Elastic
index=n8n_logs OR index=workflows node_name:"Edit Image" | stats count by user, timestamp, image_formatWritten 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 administrator. Go to Settings > About n8n or check the footer of the page to see the version number. Write down the version.
- Check if you are affectedIf your version is 1.123.67 or later in the 1.x series, or 2.31.5 or later in the 2.x series, you are not affected. If your version is earlier than these, you are affected and must upgrade.
- Back up your n8n dataBefore upgrading, back up your n8n database and any workflow files. Follow your n8n deployment method (Docker, npm, cloud, or other) to export workflows and credentials.
- Upgrade to a fixed versionUpgrade n8n to version 1.123.67, 2.31.5, or 2.32.1 or later. Use the upgrade method for your deployment: for Docker, update the image tag; for npm, run the package manager upgrade command; for managed instances, check with your provider.
- Restart the n8n serviceAfter the upgrade completes, restart n8n. For Docker, restart the container. For npm or systemd, use the restart command for your service manager. Wait for n8n to fully start before proceeding.
- Verify the upgrade workedLog in to n8n and check that Settings > About n8n shows version 1.123.67, 2.31.5, 2.32.1, or later. Confirm that workflows load and the Edit Image node appears in the node list.
- Review workflow logs for suspicious activityCheck n8n execution logs for any workflows that used the Edit Image node between when your instance was last patched and now. Look for unusual file paths in node output or error messages about file writes.
- Review file system for unexpected filesIf you found suspicious Edit Image node usage, check the n8n server's file system (especially the working directory and configuration directories) for files created at unexpected times. Remove any files you do not recognize.
How to confirm it is fixed: Log in to n8n and confirm the version shown in Settings > About is 1.123.67, 2.31.5, 2.32.1, or later.
SecurityElites Quick Fixes: copy and paste
Upgrade n8n with npmupgrade
npm install n8n@2.32.1
npm ls n8nCheck n8n version via API (requires API key)for this issue
curl -H 'X-N8N-API-KEY: your_api_key' http://localhost:5678/api/v1/healthKeep file access inside one directory (Python)general hardening
from pathlib import Path
BASE = Path("/srv/app/data").resolve()
def safe_path(name: str) -> Path:
p = (BASE / name).resolve()
if not p.is_relative_to(BASE):
raise ValueError("path outside allowed directory")
return pTest 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-72762) 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.32.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 Edit Image node can write files outside its working directory (CVE-2026-72762)
**Severity:** High | **SE Fix-First Score:** 43/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01850 https://securityelites.com/ai-vulnerabilities/cve-2026-72762-n8n-edit-image-node-can-write-files-outside-its/
### Why this matters
An authenticated user who can run workflows in n8n could write arbitrary files to the server, potentially overwriting configuration, stealing data, or taking over the n8n instance. This could lead to compromise of all workflows, credentials, and connected systems.
### What to do
1. Find your n8n version
2. Check if you are affected
3. Back up your n8n data
4. Upgrade to a fixed version
5. Restart the n8n service
6. Verify the upgrade worked
7. Review workflow logs for suspicious activity
8. Review file system for unexpected files
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-72762-n8n-edit-image-node-can-write-files-outside-its/
### Done when
- [ ] n8n is at 2.32.1 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Log in to n8n and confirm the version shown in Settings > About is 1.123.67, 2.31.5, 2.32.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
- Nik Voice Ticketing AI allows upload and run of harmful files without login Critical · CVE-2026-143966
- NLTK can overwrite files outside its data folder via hardlinks during package extraction High · CVE-2026-128135
- MLflow can read files outside its data folder via model version prompts High · CVE-2026-116690
- LiteLLM proxy can be made to read files by authenticated users High · GHSA-g5ff-637f-6q2m
- MLflow can write files outside trace directory via crafted trace ID High · CVE-2026-53995
Change history
- 22 Jul 2026: Made public
- 2 Dec 2026: Published
Official record
## ImpactThe n8n Edit Image node passed its output format to the underlying image library without validation, so a crafted value could write bytes to a location outside the node's working directory. An authenticated user able to run workflows could use this to write arbitrary files in the n8n instance.## PatchesThe issue has been fixed in n8n versions 1.123.67, 2.31.5, and 2.32.1. Users should upgrade to one of these versions or later to remediate the vulnerability.## WorkaroundsIf upgrading is not immediately possible, administrators should consider the following temporary mitigations: - Restrict n8n instance access to fully trusted users only. - Disable the Edit Image node by adding `n8n-nodes-base.editImage` to the `NODES_EXCLUDE` environment variable.These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Weakness type: CWE-73
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-72762For 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.