Detect n8n Improper Control of Dynamically-Managed Code Resources (CVE-2025-68613) in CrowdStrike LogScale
Detects exploitation of CVE-2025-68613, a critical vulnerability in n8n workflow automation platform where improper control of dynamically-managed code resources (CWE-913) allows attackers to execute arbitrary code. This vulnerability is actively exploited in the wild (CISA KEV). Attackers can abuse n8n's Code node or expression evaluation engine to break out of intended sandboxing and execute arbitrary system commands on the underlying host.
MITRE ATT&CK
- Tactic
- Execution Lateral Movement Impact
LogScale Detection Query
#event_simpleName=ProcessRollup2
| ParentBaseFileName=/node(\.exe)?$/i
| (
ImageFileName=/\/(bash|sh|dash|zsh|wget|curl|python[23]?|perl|ruby|nc|ncat)$/i
OR ImageFileName=/(cmd\.exe|powershell\.exe|pwsh\.exe|mshta\.exe)$/i
OR CommandLine=/(whoami|id\b|\/etc\/passwd|\/etc\/shadow|base64|chmod\s\+x|net\s+user|certutil|bitsadmin)/i
)
| eval risk_score=case(
CommandLine=~/\/etc\/shadow/i, "95",
CommandLine=~/base64|certutil|bitsadmin/i, "85",
ImageFileName=~/powershell|cmd\.exe/i, "80",
true(), "70")
| groupby([ComputerName, UserName, ParentBaseFileName, ImageFileName, CommandLine, risk_score])
| sort(risk_score, order=desc)
| rename(field=ComputerName, as="Hostname")
| rename(field=UserName, as="User")
| rename(field=ParentBaseFileName, as="ParentProcess")
| rename(field=ImageFileName, as="ChildProcess")
| rename(field=CommandLine, as="CommandLine")
| head(100) CrowdStrike Falcon CQL query hunting for n8n process spawning suspicious child executables or executing reconnaissance commands, indicative of CVE-2025-68613 active exploitation.
Data Sources
Required Tables
False Positives & Tuning
- Authorized n8n workflow nodes executing shell commands for DevOps tasks
- n8n automation instances that legitimately invoke Python or Perl for data processing
- Security teams running n8n-based SOAR playbooks that spawn remediation scripts
- n8n development and testing environments with unrestricted node execution
Other platforms for CVE-2025-68613
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1n8n Code Node Shell Command Execution
Expected signal: Sysmon Event ID 1 showing node process spawning sh or bash child process with command arguments containing 'id', 'whoami', 'hostname'
- Test 2n8n Expression Evaluator File Write to Temp Directory
Expected signal: Sysmon Event ID 11 (FileCreate) showing node process creating a .sh file in /tmp, followed by Event ID 1 showing chmod +x execution
- Test 3n8n Code Node Reverse Shell Simulation (Netcat)
Expected signal: Sysmon Event ID 1 showing node.js spawning nc/ncat process with -e flag and IP/port arguments; Sysmon Event ID 3 showing network connection from node process to 127.0.0.1:4444
- Test 4n8n Credential Exfiltration Simulation via HTTP
Expected signal: Sysmon Event ID 1 showing node spawning bash then curl with base64-encoded data arguments; Sysmon Event ID 3 showing network connection from curl to external host on port 9999
Unlock Pro Content
Get the full detection package for CVE-2025-68613 including response playbook, investigation guide, and atomic red team tests.