CVE-2026-27498
📋 TL;DR
This vulnerability allows authenticated users with workflow creation/modification permissions in n8n to achieve remote code execution by chaining file operations with git commands. Attackers can write malicious configuration files and trigger git operations to execute arbitrary shell commands on the n8n host. All n8n installations prior to versions 2.2.0 and 1.123.8 are affected.
💻 Affected Systems
- n8n
📦 What is this software?
N8n by N8n
N8n by N8n
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the n8n host allowing attackers to execute arbitrary commands, access sensitive data, pivot to other systems, and establish persistent access.
Likely Case
Authenticated attackers with workflow permissions gain shell access to the n8n host, potentially accessing sensitive workflow data and system resources.
If Mitigated
With proper permission controls and node restrictions, risk is limited to trusted users only, though insider threat remains possible.
🎯 Exploit Status
Requires authenticated access with specific permissions and knowledge of workflow chaining techniques. The advisory provides technical details but no public exploit code.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.2.0 or 1.123.8
Vendor Advisory: https://github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq
Restart Required: Yes
Instructions:
1. Backup your n8n instance and workflows. 2. Stop the n8n service. 3. Update n8n to version 2.2.0 or 1.123.8 using your package manager or deployment method. 4. Restart the n8n service. 5. Verify the update was successful.
🔧 Temporary Workarounds
Disable Read/Write Files from Disk Node
allPrevents exploitation by removing the vulnerable node from available workflow nodes
export NODES_EXCLUDE=n8n-nodes-base.readWriteFile
🧯 If You Can't Patch
- Limit workflow creation and editing permissions to fully trusted users only
- Implement strict access controls and monitor user activity on n8n instances
🔍 How to Verify
Check if Vulnerable:
Check n8n version via web interface or API. If version is below 2.2.0 (for v2) or 1.123.8 (for v1), the system is vulnerable.
Check Version:
Check n8n web interface settings or use: curl -X GET 'http://n8n-host:5678/rest/version'
Verify Fix Applied:
Confirm n8n version is 2.2.0 or higher (for v2) or 1.123.8 or higher (for v1). Test that the Read/Write Files from Disk node cannot be used for malicious git operations.
📡 Detection & Monitoring
Log Indicators:
- Unusual git operations triggered via n8n workflows
- Multiple file write operations followed by git commands
- Workflow executions with suspicious file paths
Network Indicators:
- Unexpected outbound connections from n8n host following workflow execution
SIEM Query:
source="n8n" AND ("git" OR "writeFile" OR "readWriteFile") AND status="success"
🔗 References
- https://github.com/n8n-io/n8n/commit/97365caf253978ba8e46d7bc53fa7ac3b6f67b32
- https://github.com/n8n-io/n8n/commit/e22acaab3dcb2004e5fe0bf9ef2db975bde61866
- https://github.com/n8n-io/n8n/releases/tag/n8n@1.123.8
- https://github.com/n8n-io/n8n/releases/tag/n8n@2.2.0
- https://github.com/n8n-io/n8n/security/advisories/GHSA-x2mw-7j39-93xq