CVE-2026-25052
CVE-2026-25052
Weakness (CWE)
CVSS Vector
v4.0- Attack Vector
- Network
- Attack Complexity
- Low
- Attack Requirements
- None
- Privileges Required
- Low
- User Interaction
- None
- Confidentiality (Vulnerable)
- High
- Integrity (Vulnerable)
- High
- Availability (Vulnerable)
- High
- Confidentiality (Subsequent)
- High
- Integrity (Subsequent)
- High
- Availability (Subsequent)
- High
Description
n8n is an open source workflow automation platform. Prior to versions 1.123.18 and 2.5.0, a vulnerability in the file access controls allows authenticated users with permission to create or modify workflows to read sensitive files from the n8n host system. This can be exploited to obtain critical configuration data and user credentials, leading to complete account takeover of any user on the instance. This issue has been patched in versions 1.123.18 and 2.5.0.
CVE-2026-25052 Technical Analysis
Executive Summary
CVE-2026-25052 represents a critical security vulnerability in n8n workflow automation platform with a CVSS score of 9.9. This file access control bypass allows authenticated users to escalate privileges and read arbitrary files from the host system, potentially leading to complete instance compromise through credential theft and account takeover.
1. Vulnerability Assessment and Severity Evaluation
Severity Classification
- CVSS Score: 9.9 (Critical)
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Changed (affects resources beyond the vulnerable component)
Technical Assessment
The vulnerability stems from inadequate file access controls in n8n's workflow execution engine. The critical nature (9.9 CVSS) is justified by:
- Confidentiality Impact: HIGH - Exposure of sensitive configuration files and credentials
- Integrity Impact: HIGH - Potential for complete account takeover enables data manipulation
- Availability Impact: HIGH - Compromised credentials could lead to service disruption
- Scope Change: YES - Affects the entire n8n instance and potentially connected systems
Risk Factors
- Exploitable by low-privileged authenticated users
- No specialized knowledge required for exploitation
- Direct path to administrative access
- Affects core functionality (workflow creation/modification)
2. Potential Attack Vectors and Exploitation Methods
Attack Chain
1. Initial Access
└─> Authenticated user with workflow creation/modification permissions
2. Exploitation
└─> Craft malicious workflow with file read operations
└─> Target sensitive system files:
├─> /etc/passwd, /etc/shadow (Linux)
├─> n8n configuration files
├─> Database credentials
├─> API keys and tokens
└─> User credential stores
3. Privilege Escalation
└─> Extract administrative credentials
└─> Complete account takeover
4. Lateral Movement
└─> Access connected systems via stolen credentials
└─> Compromise integrated services and APIs
Exploitation Scenarios
Scenario 1: Configuration File Extraction
# Malicious workflow node example
- Read File Node:
file_path: "/root/.n8n/config"
operation: "read"
output: "workflow_variable"
Scenario 2: Credential Harvesting
- Target n8n's credential storage locations
- Extract database connection strings
- Obtain OAuth tokens for integrated services
- Access encryption keys
Scenario 3: System Reconnaissance
- Read
/proc/self/environfor environment variables - Access application logs containing sensitive data
- Map internal network configuration
- Identify additional attack surfaces
Technical Exploitation Characteristics
- No authentication bypass required - legitimate credentials sufficient
- Workflow-based exploitation - uses intended functionality maliciously
- Persistent access - workflows can be saved for repeated exploitation
- Stealth potential - file reads may not trigger obvious alerts
3. Affected Systems and Software Versions
Vulnerable Versions
- n8n versions < 1.123.18 (1.x branch)
- n8n versions < 2.5.0 (2.x branch)
Affected Deployment Models
- Self-hosted installations (primary target)
- Docker containerized deployments
- Kubernetes/orchestrated environments
- Cloud VM deployments (AWS, Azure, GCP)
Platform Considerations
- Linux systems: Higher risk due to predictable file paths
- Windows systems: Also vulnerable, different file targets
- Container environments: May have limited exposure depending on volume mounts
Dependency Chain
The vulnerability affects:
- Core n8n workflow engine
- File system interaction modules
- Workflow execution runtime
- Permission validation layer
4. Recommended Mitigation Strategies
Immediate Actions (Priority 1)
1. Patch Deployment
# For npm installations
npm update n8n@latest
# For Docker deployments
docker pull n8nio/n8n:latest
docker-compose down && docker-compose up -d
# Verify version
n8n --version # Should show >= 1.123.18 or >= 2.5.0
2. Emergency Workarounds (if patching delayed)
- Restrict workflow creation/modification to trusted administrators only
- Implement network segmentation to isolate n8n instances
- Enable comprehensive audit logging for all workflow operations
- Monitor file system access patterns for anomalies
Short-term Mitigations (Priority 2)
Access Control Hardening
# Recommended RBAC configuration
roles:
- name: "restricted_user"
permissions:
- "workflow:execute"
# REMOVE: workflow:create, workflow:update
- name: "workflow_developer"
permissions:
- "workflow:create"
- "workflow:update"
# Limit to trusted users only
File System Isolation
# Run n8n with restricted file system access
docker run -d \
--read-only \
--tmpfs /tmp \
--security-opt=no-new-privileges \
-v n8n_data:/home/node/.n8n \
n8nio/n8n:latest
Monitoring Implementation
- Deploy file integrity monitoring (FIM) on sensitive files
- Configure SIEM alerts for:
- Unusual file access patterns
- Workflow modifications by non-admin users
- Access to configuration directories
- Repeated file read operations
Long-term Security Enhancements (Priority 3)
1. Defense in Depth
- Implement application-level sandboxing for workflow execution
- Deploy SELinux/AppArmor policies restricting n8n file access
- Use dedicated service accounts with minimal permissions
- Encrypt sensitive configuration data at rest
2. Security Architecture
┌─────────────────────────────────────┐
│ Reverse Proxy (WAF enabled) │
├─────────────────────────────────────┤
│ n8n Application (patched) │
│ - Restricted file system access │
│ - Sandboxed workflow execution │
├─────────────────────────────────────┤
│ Secrets Management (Vault/KMS) │
│ - Externalized credentials │
├─────────────────────────────────────┤
│ Audit Logging & SIEM │
└─────────────────────────────────────┘
3. Credential Management
- Migrate to external secrets management (HashiCorp Vault, AWS Secrets Manager)
- Implement credential rotation policies
- Use short-lived tokens where possible
- Enable multi-factor authentication for all accounts
4. Incident Response Preparation
# Detection script example
import os
import json
from datetime import datetime
def audit_workflow_file_access():
"""Monitor n8n workflows for suspicious file operations"""
suspicious_patterns = [
'/etc/passwd', '/etc/shadow', '/.n8n/config',
'credentials', 'database.sqlite', '.env'
]
# Parse workflow definitions
for workflow in get_all_workflows():
for node in workflow['nodes']:
if node['type'] in ['n8n-nodes-base.readFile',
'n8n-nodes-base.executeCommand']:
for pattern in suspicious_patterns:
if pattern in str(node['parameters']):
alert_security_team(workflow, node)
5. Impact on Cybersecurity Landscape
Industry-Wide Implications
Workflow Automation Security Paradigm Shift
- Highlights risks in low-code/no-code platforms
- Demonstrates need for runtime security controls in automation tools
- Raises questions about file system access in workflow engines
Supply Chain Considerations
- n8n integrates with 350+ services and APIs
- Compromised instances can pivot to connected systems
- Credential theft enables multi-platform attacks
- Affects organizations using n8n for critical automation
Threat Actor Interest
Attractiveness to Attackers
- APT Groups: High-