Description
n8n is an open source workflow automation platform. Prior to versions 1.123.10 and 2.5.0, vulnerabilities in the Git node allowed authenticated users with permission to create or modify workflows to execute arbitrary system commands or read arbitrary files on the n8n host. This issue has been patched in versions 1.123.10 and 2.5.0.
EPSS Score:
0%
EUVD-2026-5418: Critical Vulnerability Analysis
n8n Workflow Automation Platform - Command Injection & Arbitrary File Read
1. VULNERABILITY ASSESSMENT AND SEVERITY EVALUATION
Severity Classification
CVSS 4.0 Base Score: 9.4 (CRITICAL)
This vulnerability represents a critical security risk with the following characteristics:
CVSS 4.0 Vector Analysis:
- Attack Vector (AV:N): Network-based exploitation - remotely exploitable
- Attack Complexity (AC:L): Low complexity - minimal specialized conditions required
- Attack Requirements (AT:N): No additional attack requirements
- Privileges Required (PR:L): Low privileges - authenticated user access required
- User Interaction (UI:N): No user interaction needed
- Impact Metrics: All set to HIGH (VC:H/VI:H/VA:H/SC:H/SI:H/SA:H)
- Complete compromise of confidentiality, integrity, and availability
- Subsequent system impact equally severe
Risk Assessment
The 9.4 CVSS score places this vulnerability in the critical severity tier, indicating:
- Immediate exploitation potential by authenticated attackers
- Complete system compromise capability
- Minimal technical barriers to exploitation
- Severe business impact potential
2. POTENTIAL ATTACK VECTORS AND EXPLOITATION METHODS
Primary Attack Vectors
A. Arbitrary Command Execution
Attack Mechanism:
- Authenticated users with workflow creation/modification permissions can inject malicious commands through the Git node
- Command injection likely occurs through unsanitized input parameters (repository URLs, branch names, commit messages, or Git commands)
- Execution occurs in the context of the n8n process, typically with elevated privileges
Exploitation Scenario:
1. Attacker authenticates with low-privilege workflow editor credentials
2. Creates/modifies workflow containing Git node
3. Injects shell metacharacters or command separators in Git parameters
4. Triggers workflow execution
5. Arbitrary commands execute on n8n host system
B. Arbitrary File Read
Attack Mechanism:
- Path traversal or file inclusion vulnerabilities in Git node file operations
- Potential exploitation of Git configuration file reads
- Bypass of intended file access restrictions
Exploitation Scenario:
1. Attacker crafts Git node configuration with malicious file paths
2. Uses path traversal sequences (../, absolute paths)
3. Accesses sensitive files:
- /etc/passwd, /etc/shadow
- Application configuration files
- Database credentials
- API keys and secrets
- Other workflow definitions containing credentials
Attack Chain Progression
Phase 1: Initial Access
- Compromise of low-privilege n8n user account (phishing, credential stuffing, insider threat)
- Exploitation of separate authentication vulnerabilities
Phase 2: Privilege Escalation
- Leverage workflow permissions to execute commands
- Read sensitive files to extract credentials
- Escalate to root/administrator access on host system
Phase 3: Lateral Movement
- Access connected systems via extracted credentials
- Compromise integrated services (databases, APIs, cloud resources)
- Pivot through network infrastructure
Phase 4: Impact
- Data exfiltration
- Ransomware deployment
- Persistent backdoor installation
- Supply chain attacks (if n8n manages production workflows)
3. AFFECTED SYSTEMS AND SOFTWARE VERSIONS
Vulnerable Versions
- n8n versions < 1.123.10 (Version 1.x branch)
- n8n versions < 2.5.0 (Version 2.x branch)
Deployment Scenarios at Risk
High-Risk Environments:
- Self-hosted n8n instances (Docker, Kubernetes, bare metal)
- Multi-tenant deployments with shared infrastructure
- Cloud-hosted instances (AWS, Azure, GCP) with inadequate isolation
- Enterprise automation platforms managing critical business processes
- CI/CD pipeline integrations using n8n for workflow orchestration
Affected Components:
- Git node module (primary vulnerability location)
- Workflow execution engine (command execution context)
- File system access layer (arbitrary read capability)
Environmental Factors Increasing Risk:
- n8n running with elevated system privileges
- Insufficient network segmentation
- Shared hosting environments
- Access to sensitive internal networks
- Integration with critical business systems
4. RECOMMENDED MITIGATION STRATEGIES
Immediate Actions (Priority 1 - Within 24-48 Hours)
A. Patch Deployment
CRITICAL: Upgrade to patched versions immediately
- Version 1.x users → Upgrade to 1.123.10 or later
- Version 2.x users → Upgrade to 2.5.0 or later
Upgrade Procedure:
- Backup current n8n instance and workflow data
- Review release notes for breaking changes
- Test upgrade in staging environment
- Schedule maintenance window for production upgrade
- Verify Git node functionality post-upgrade
- Monitor for anomalous behavior
B. Temporary Compensating Controls (If Immediate Patching Impossible)
Access Restriction:
- Revoke workflow creation/modification permissions for non-essential users
- Implement strict approval workflow for Git node usage
- Disable Git node functionality if not business-critical
- Enable comprehensive audit logging
Network Isolation:
- Restrict n8n host network access using firewall rules
- Implement egress filtering to prevent data exfiltration
- Isolate n8n in dedicated network segment/VLAN
- Deploy network intrusion detection systems (IDS)
Runtime Protection:
- Deploy application-level firewalls (WAF)
- Implement SELinux/AppArmor mandatory access controls
- Run n8n with minimal required privileges (non-root)
- Use containerization with restricted capabilities
Medium-Term Actions (Priority 2 - Within 1 Week)
C. Security Hardening
Access Control Enhancement:
- Implement principle of least privilege for workflow permissions
- Enable multi-factor authentication (MFA) for all n8n accounts
- Conduct access review and revoke unnecessary permissions
- Implement role-based access control (RBAC) with granular permissions
Monitoring and Detection:
Deploy monitoring for:
- Unusual Git node usage patterns
- Command execution anomalies
- File access to sensitive paths
- Workflow modifications by unauthorized users
- Network connections to unexpected destinations
Audit Configuration:
- Enable comprehensive audit logging
- Centralize logs to SIEM platform
- Configure alerts for suspicious activities
- Implement log retention policies compliant with regulations
D. Incident Response Preparation
Forensic Readiness:
- Document current n8n configuration and workflow inventory
- Establish baseline of normal Git node usage
- Create incident response playbook specific to this vulnerability
- Identify forensic artifacts for compromise detection
Compromise Assessment:
Investigate for indicators of exploitation:
- Review workflow modification history (especially Git nodes)
- Analyze system command execution logs
- Check for unauthorized file access patterns
- Examine network traffic for data exfiltration
- Review user authentication logs for anomalies
Long-Term Actions (Priority 3 - Ongoing)
E. Security Architecture Improvements
Defense in Depth:
- Implement application whitelisting on n8n hosts
- Deploy endpoint detection and response (EDR) solutions
- Establish secure workflow development lifecycle
- Conduct regular security assessments and penetration testing
Secure Configuration Management:
- Maintain n8n instances using infrastructure-as-code
- Implement automated vulnerability scanning
- Establish patch management procedures with SLA commitments
- Create secure baseline configurations
5. IMPACT ON EUROPEAN CYBERSECURITY LANDSCAPE
Regulatory and Compliance Implications
A. GDPR Considerations (Regulation EU 2016/679)
Data Protection Impact:
- Arbitrary file read capability may expose personal data
- Command execution could lead to unauthorized data processing
- Potential for massive data breaches requiring notification under Article 33
Compliance Requirements:
- Article 32 (Security of Processing): Organizations must implement appropriate technical measures
- Article 33 (Breach Notification): 72-hour notification requirement if exploitation detected
- **Article