Table of Contents
- BLUF (Bottom Line Up Front)
- Executive Summary
- Key Findings
- Recommendations
- Vulnerability Metrics
- Timeline
- Technical Details
- Supply Chain Attack: Sha1-Hulud
- Threat Activity
- Indicators of Compromise
- Mitigations
- References
- Public PoCs
- Protect Your Infrastructure with Baysec Vulnripper
BLUF (Bottom Line Up Front)
Upgrade n8n to 2.0.0+ immediately. CVE-2026-21858 (Ni8mare, CVSS 10.0) enables unauthenticated RCE on any n8n instance with exposed webhooks. Public exploits exist; Baysec honeypots detected active scanning. If 2.0.0 is not feasible: minimum 1.121.3 (patches Ni8mare + file write RCE). If patching is delayed: disable public webhooks, restrict network access, assume credential exposure. Audit npm dependencies for Sha1-Hulud supply chain compromise (see indicators).
Root cause: Insufficient patch management. The 100,000+ exposed instances running vulnerable versions highlight a systemic failure to keep self-hosted software current. Implement automated patch management (Dependabot, Renovate, or CI/CD version checks) to prevent future exposure windows.
Executive Summary
Between November 2025 and January 2026, the n8n workflow automation platform experienced a cascade of critical security issues, creating what we assess as an extreme risk environment for self-hosted deployments.
Why This Matters: n8n is one of the most popular open-source workflow automation platforms, with 167,000+ GitHub stars and widespread adoption across enterprises, startups, and developers for automating business processes, integrating APIs, and building AI workflows. Its popularity makes it a high-value target-compromising n8n instances provides attackers access to connected systems, stored credentials, and sensitive business logic.
Baysec identified 16 n8n CVEs affecting current deployments through the Baysec CTI Platform, with five rated CVSS 9.1-10.0 (Critical). The most severe, Ni8mare (CVE-2026-21858), enables complete unauthenticated takeover through a Content-Type confusion vulnerability in webhook handlers.
Real-world impact: While we have not attributed any confirmed breaches to these vulnerabilities yet, the combination of:
- 100,000+ exposed instances (Censys Advisory, December 2025)
- Public exploit code available within hours of disclosure
- Supply chain poisoning via the Sha1-Hulud npm worm (see indicators)
This situation creates conditions for widespread compromise. n8n instances typically store API keys, OAuth tokens, database credentials, and cloud access keys, making them high-value targets for initial access and lateral movement.
Baysec CTI assesses this as a critical risk for organizations running self-hosted n8n.
Immediate action: Upgrade to n8n 2.0.0+ (or minimum 1.121.3).
Risk assessment:
- Self-hosted deployments face the highest risk
- n8n Cloud users should consult n8n’s security advisories for Cloud-specific impact per CVE
Key Findings
- Unauthenticated RCE: CVE-2026-21858 (Ni8mare) requires no credentials; attackers can read files, forge admin sessions, and execute commands.
- Multiple critical RCEs: Four vulnerabilities scored CVSS 9.9-10.0 in a two-month period (high CVE counts reflect security research focus on popular software, not inherently poor quality).
- Massive exposure: Censys identified 103,476 potentially vulnerable instances (December 22, 2025); Shodan shows 71,118+ with the n8n banner.
- Supply chain compromise: The Sha1-Hulud npm worm trojanized multiple n8n-nodes-* community packages, stealing credentials and propagating via GitHub Actions.
- Rapid weaponization: Public exploits appeared within 9 hours of Ni8mare disclosure.
- No ransomware attribution yet: We have not confirmed any ransomware victims tied to these CVEs, but credential theft typically precedes ransomware deployment.
Recommendations
The root cause of this exposure is insufficient patch management. Organizations running outdated n8n versions lacked processes to detect and apply security updates promptly. Address this systematically:
- Inventory all n8n instances including development, staging, production, and test environments.
- Prioritize patching based on internet exposure and data sensitivity:
- Minimum: Upgrade to 1.121.3 (patches Ni8mare and critical file write RCE).
- Recommended: Upgrade to n8n 2.0.0+ (patches critical RCEs including Python sandbox escapes).
- Implement automated patch management to prevent future exposure:
- Enable Renovate or Dependabot for automated version updates (both support
docker-compose.yml,Dockerfile, npm dependencies) - Configure CI/CD pipelines to flag outdated dependencies
- Subscribe to n8n security advisories for immediate notification
- Establish SLAs for critical security patches (e.g., 24-48 hours for CVSS 9.0+)
- Enable Renovate or Dependabot for automated version updates (both support
- Audit npm dependencies for trojanized packages; remove any suspicious n8n-nodes-* packages. See Sha1-Hulud indicators.
- Rotate credentials stored in n8n: API keys, OAuth tokens, database credentials, cloud access keys.
- Assume compromise if running unpatched versions with internet exposure.
- Review network logs for unusual traffic to port 5678 from unfamiliar sources. See Ni8mare exploitation patterns.
Vulnerability Metrics
Primary Critical Vulnerabilities
CVE-2026-21858 (Ni8mare) - Unauthenticated RCE
↑ Click heading above to jump to detailed technical analysis
| Metric | Value |
|---|---|
| Description | n8n versions below 1.121.0 permit attackers to access files on the underlying server through execution of certain form-based workflows. An unauthenticated remote attacker exploiting this flaw could obtain sensitive data stored on the system, potentially enabling further compromise. |
| CVSS 3.1 | 10.0 (Critical) |
| CVSS Vector | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N |
| EPSS | Pending (newly assigned CVE) |
| CWE | CWE-20: Improper Input Validation |
| Attack Vector | Network |
| Authentication | None |
| Patch Version | 1.121.0 |
| Vendor Advisory | GHSA-v4pr-fm98-w9pg |
| CISA KEV | Not listed (KEV Catalog, Jan 8, 2026) |
CVE-2026-21877 - Authenticated Arbitrary File Write → RCE
↑ Click heading above to jump to detailed technical analysis
| Metric | Value |
|---|---|
| Description | n8n versions below 1.121.3 allow authenticated attackers to execute malicious code using the n8n service. The vulnerability enables arbitrary file write capabilities leading to remote code execution, affecting both self-hosted and cloud deployments. |
| CVSS 3.1 | 9.9 (Critical) |
| CVSS Vector | AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| EPSS | Pending |
| CWE | CWE-434: Unrestricted Upload, CWE-94: Code Injection |
| Attack Vector | Network |
| Authentication | Required |
| Patch Version | 1.121.3 |
| Vendor Advisory | GHSA-v364-rw7m-3263 |
| CISA KEV | Not listed |
CVE-2025-68613 - Expression Injection RCE
↑ Click heading above to jump to detailed technical analysis
| Metric | Value |
|---|---|
| Description | n8n versions 0.211.0 through 1.120.3 and 1.121.0 contain a critical remote code execution vulnerability in their workflow expression evaluation system. Authenticated users can supply expressions during workflow configuration that get evaluated in an insufficiently isolated execution context, permitting arbitrary code execution with n8n process privileges. |
| CVSS 3.1 | 9.9 (Critical) |
| CVSS Vector | AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| EPSS | 8.42% (92nd percentile) |
| CWE | CWE-94: Code Injection, CWE-20: Improper Input Validation |
| Attack Vector | Network |
| Authentication | Required |
| Patch Version | 1.120.4 / 1.121.1 / 1.122.0 |
| Vendor Advisory | GHSA-v98v-ff95-f3cp |
| CISA KEV | Not listed |
EPSS Note: CVE-2025-68613 has an EPSS score of 8.42%, placing it in the 92nd percentile - indicating high probability of exploitation in the wild within 30 days.
CVE-2025-68668 - Pyodide Sandbox Escape
↑ Click heading above to jump to detailed technical analysis
| Metric | Value |
|---|---|
| Description | n8n versions 1.0.0 through 1.65535.65535 (prior to 2.0.0) contain a critical sandbox bypass vulnerability in the Python Code Node. Authenticated users can exploit Pyodide’s Python-JavaScript interoperability to escape the WebAssembly sandbox, access Node.js internals, and execute arbitrary system commands with n8n process privileges. |
| CVSS 3.1 | 9.9 (Critical) |
| CVSS Vector | AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L |
| EPSS | Pending |
| CWE | CWE-693: Protection Mechanism Failure |
| Attack Vector | Network |
| Authentication | Required (Low privileges) |
| Patch Version | 2.0.0 |
| Vendor Advisory | GHSA-62r4-hw23-cc8v |
| CISA KEV | Not listed |
Complete Vulnerability Inventory (April 2025 – January 2026)
Vulnerability Intelligence analysis via the Baysec Platform identified 16 n8n CVEs affecting current deployments. Note: High CVE counts often indicate active security research, not inherently poor software quality. n8n’s popularity (167K+ GitHub stars) makes it a high-value research target.
| CVE ID | CVSS | Severity | Published | Patch | Impact |
|---|---|---|---|---|---|
| CVE-2026-21858 | 10.0 | CRITICAL | 2026-01-07 | 1.121.0 | Unauthenticated file read → admin bypass → RCE |
| CVE-2026-21877 | 9.9 | CRITICAL | 2026-01-07 | 1.121.3 | Authenticated arbitrary file write → RCE |
| CVE-2025-68668 | 9.9 | CRITICAL | 2025-12-26 | 2.0.0 | Pyodide sandbox escape in Python Code Node |
| CVE-2025-68613 | 9.9 | CRITICAL | 2025-12-19 | 1.120.4+ | Expression injection RCE |
| CVE-2025-55526 | 9.1 | CRITICAL | 2025-08-26 | – | Directory traversal in download_workflow |
| CVE-2025-65964 | 8.8 | HIGH | 2025-12-08 | 1.119.2 | RCE via Git pre-commit hooks |
| CVE-2025-62726 | 8.8 | HIGH | 2025-10-30 | 1.113.0 | Git Node RCE via malicious pre-commit hooks |
| CVE-2025-56265 | 8.8 | HIGH | 2025-09-08 | – | Arbitrary file upload in Chat Trigger |
| CVE-2025-52478 | 8.7 | HIGH | 2025-08-19 | 1.98.2 | Stored XSS in Form Trigger → Account Takeover |
| CVE-2025-61914 | 7.3 | HIGH | 2025-12-26 | 1.114.0 | Stored XSS in “Respond to Webhook” node |
| CVE-2025-68697 | 7.1 | HIGH | 2025-12-26 | 2.0.0 | Legacy Code node arbitrary file read/write |
| CVE-2025-57749 | 6.5 | MEDIUM | 2025-08-20 | 1.106.0 | Symlink traversal in Read/Write File node |
| CVE-2025-58177 | 5.4 | MEDIUM | 2025-09-15 | 1.107.0 | Stored XSS in LangChain Chat Trigger |
| CVE-2025-46343 | 5.0 | MEDIUM | 2025-04-29 | 1.90.0 | Stored XSS via attachments view |
| CVE-2025-49595 | 4.9 | MEDIUM | 2025-07-03 | 1.99.0 | DoS via malformed binary-data URIs |
| CVE-2025-49592 | 4.6 | MEDIUM | 2025-06-26 | 1.98.0 | Open redirect in /signin endpoint |
Timeline
| Date | Event | Source |
|---|---|---|
| 2025-11-09 | Researcher Dor Attias (Cyera) reports Ni8mare to n8n | Cyera Blog |
| 2025-11-10 | n8n acknowledges the vulnerability report | Cyera Blog |
| 2025-11-18 | n8n releases version 1.121.0 patching CVE-2026-21858 | GitHub Release |
| 2025-11-20 | Multiple medium-severity CVEs disclosed (XSS, symlink traversal, open redirect) | GitHub Advisories |
| 2025-11-24 | Sha1-Hulud 2.0 npm worm campaign begins, compromising n8n packages | Baysec CTI, Microsoft Security Blog |
| 2025-12-09 | CVE-2025-65964 disclosed (Git pre-commit hook RCE) | CIRCL |
| 2025-12-19 | CVE-2025-68613 (CVSS 9.9) – Expression injection RCE disclosed | CIRCL |
| 2025-12-22 | Censys reports 103,476 exposed n8n instances | Censys |
| 2025-12-26 | Three critical CVEs disclosed simultaneously (CVE-2025-68668, CVE-2025-68697, CVE-2025-61914) | GitHub Advisories |
| 2026-01-06 | CVE-2026-21858 officially assigned; Canadian Cyber Centre advisory AV26-004 published | CCCS |
| 2026-01-07 | Media coverage begins | BleepingComputer, TheHackerNews |
| 2026-01-07 | Cyera publishes Ni8mare technical blog post | Cyera Blog |
| 2026-01-08 | Public exploit released (Chocapikk/CVE-2026-21858); scanning activity peaks | GitHub PoC |
Technical Details
Ni8mare (CVE-2026-21858)
Protocol: HTTP webhooks, TCP/5678 (default)
Exploitation requirements:
- Attacker can reach n8n instance on network
- Instance has webhook or form endpoints enabled
- Attack requires no authentication
How It Works
Ni8mare exploits a Content-Type confusion vulnerability in n8n’s webhook handler. The parseRequestBody() function decides whether to invoke a file-upload parser or a regular body parser based on the Content-Type header.
When a webhook is configured to accept multipart/form-data, n8n uses a special upload parser. However, by setting a different Content-Type (e.g., application/json), an attacker can bypass the upload parser while still controlling the req.body.files object.
Exploitation chain:
| |
Payload Example
See Ni8mare Exploitation Patterns in the Indicators of Compromise section for HTTP request indicators, target file paths, and detection patterns.
Affected Versions
| Version Range | Status |
|---|---|
| 1.65.0 – 1.120.x | Vulnerable |
| 1.121.0+ | Patched |
Note: Per GitHub Advisory GHSA-v4pr-fm98-w9pg, version 1.65.0 introduced this vulnerability; version 1.121.0 patched it. This CVE does not affect versions prior to 1.65.0.
Arbitrary File Write via Git Node (CVE-2026-21877)
CVE-2026-21877 is a critical authenticated RCE vulnerability allowing attackers to write arbitrary files to the n8n server’s filesystem through the Git node, ultimately enabling code execution.
Exploitation requirements:
- Authenticated access to n8n (any user account with workflow permissions)
- Git node must be enabled
- Attack requires low privileges and no user interaction
How It Works
The Git node in n8n allows users to clone repositories and perform Git operations. However, prior to version 1.121.3, the node lacked proper validation of the repository path parameter. This enabled authenticated attackers to specify arbitrary file system paths, bypassing n8n’s file access restrictions.
Exploitation chain:
| |
Attack vectors:
- Overwrite package.json: Inject malicious
postinstallscripts that execute on next npm operation - Modify startup scripts: Replace systemd service files or Docker entrypoints
- Plant backdoors: Write malicious
.jsfiles intonode_modulesor custom node directories - Credential theft: Overwrite configuration files to exfiltrate stored credentials
Technical Root Cause
The vulnerability stemmed from missing path validation in the Git node implementation. The node accepted user-supplied repositoryPath parameters without checking whether the path was blocked by n8n’s file system security controls.
Fix (version 1.121.3):
| |
The patch introduced isFilePathBlocked() validation before any Git operations execute, preventing access to restricted paths.
Affected Versions
| Version Range | Status |
|---|---|
| 0.123.0 – 1.121.2 | Vulnerable |
| 1.121.3+ | Patched |
Note: Per GitHub Advisory GHSA-v364-rw7m-3263, version 0.123.0 introduced the Git node; version 1.121.3 patched this vulnerability. Versions prior to 0.123.0 are not affected.
Discovery credit: Security researcher Théo Lelasseux
Expression Injection (CVE-2025-68613)
CVE-2025-68613 is a critical authenticated RCE vulnerability in n8n’s workflow expression evaluation system. Authenticated attackers can inject malicious expressions that escape the sandbox and execute arbitrary code with n8n process privileges.
Exploitation requirements:
- Authenticated access to n8n (any user with workflow creation/edit permissions)
- Ability to create or modify workflows
- Attack requires low privileges and no user interaction
How It Works
n8n allows users to embed JavaScript expressions in workflow configurations using {{ }} syntax. These expressions are evaluated at runtime to enable dynamic data processing. To prevent code injection, n8n implements AST-based (Abstract Syntax Tree) protections through the tournament library to block dangerous patterns.
The core vulnerability: The sandbox can be bypassed by accessing Node.js internals through prototype chain manipulation. Attackers craft expressions that reach the process object and use mainModule.require() to load arbitrary Node.js modules.
Exploitation chain:
| |
Bypass techniques observed in the wild:
| |
Technical Root Cause
Tournament library limitations: While AST-based filtering blocks obvious dangerous patterns like direct require() calls, it cannot prevent:
- Prototype chain traversal — Accessing
processviathis.processor constructor chains - Dynamic property access — Using bracket notation to evade static analysis
- Indirect module loading — Reaching
requirethroughmainModulerather than direct calls
The fix in versions 1.120.4/1.121.1/1.122.0 added additional blocked patterns and strengthened the expression sandbox context.
Affected Versions
| Version Range | Status |
|---|---|
| 0.211.0 – 1.120.3 | Vulnerable |
| 1.121.0 | Vulnerable (regression) |
| 1.120.4 / 1.121.1 / 1.122.0+ | Patched |
Note: Per GitHub Advisory GHSA-v98v-ff95-f3cp, version 0.211.0 introduced the vulnerability. Version 1.121.0 contained a regression, requiring a separate patch in 1.121.1.
Detection patterns: See CVE-2025-68613 Behavioral Indicators in the IoC section.
Pyodide Sandbox Escape (CVE-2025-68668)
CVE-2025-68668, codenamed “N8scape”, is a critical protection mechanism failure in n8n’s Python Code Node that enables authenticated attackers to escape the Pyodide WebAssembly sandbox and execute arbitrary system commands.
Exploitation requirements:
- Authenticated access to n8n (any user with workflow creation/modification permissions)
- Python Code Node enabled (default configuration)
- Attack requires low privileges and no user interaction
How It Works
The Python Code Node relies on Pyodide, a WebAssembly-compiled Python runtime designed for browser environments. While Pyodide provides execution isolation through WebAssembly, it was never designed as a security sandbox - it’s optimized for interoperability, not hostile-code isolation.
The core architectural flaw: Pyodide exposes first-class Python-JavaScript interoperability as a feature. Authenticated attackers can abuse this bridge to:
- Access JavaScript globals from within Python code
- Reach Node.js internals through the JavaScript execution context
- Invoke native system commands using Node.js
child_processmodule - Execute with full n8n process privileges
Trust boundary violation:
The vulnerability represents a design-level failure in how trust boundaries were defined between multiple runtimes (Python/WebAssembly/JavaScript/Node.js) operating inside the same process. The Pyodide sandbox was treated as a security boundary when it fundamentally isn’t one.
Exploitation chain:
| |
Technical Root Cause
Pyodide is not a hardened security sandbox. Key issues:
- Designed for interoperability, not isolation - Pyodide’s core feature is seamless Python↔JavaScript interaction
- Shared process context - Python code runs in the same Node.js process as n8n
- No security boundaries - WebAssembly memory isolation doesn’t prevent access to JavaScript globals
- Trust assumption mismatch - n8n treated Pyodide as a security boundary when it’s just a runtime environment
Fix (version 2.0.0)
n8n 2.0.0 introduced task-runner-based sandboxing, fundamentally changing the execution model:
Old model (vulnerable):
- Python code executes via Pyodide in the same Node.js process as n8n
- Shared memory space and JavaScript context
- No process-level isolation
New model (secure):
- Python code executes in separate task runner processes
- Process-level isolation from main n8n process
- Native Python interpreter (not WebAssembly)
- Restricted capabilities and resource limits
Configuration (n8n 2.0.0+):
| |
Affected Versions
| Version Range | Status |
|---|---|
| 1.0.0 – 1.999.x (all pre-2.0) | Vulnerable |
| 2.0.0+ | Patched (task-runner isolation) |
Note: Task-runner-based Python execution was introduced as an optional feature in n8n 1.111.0 and became the default in 2.0.0.
Discovery credit: Security researchers Vladimir Tokarev and Ofek Itach from Cyera Research Labs
MITRE ATT&CK Mapping
| Technique | ID | Description |
|---|---|---|
| Exploit Public-Facing Application | T1190 | Ni8mare exploits exposed webhook endpoints |
| Unsecured Credentials | T1552 | Credentials extracted from n8n database/config |
| Command and Scripting Interpreter | T1059 | RCE via Execute Command node or expression injection |
| Valid Accounts | T1078 | Forged admin sessions from stolen credentials |
| Supply Chain Compromise | T1195 | Sha1-Hulud trojanized npm packages |
Supply Chain Attack: Sha1-Hulud
Overview
A separate campaign, the “Sha1-Hulud: The Second Coming” npm worm, has compromised hundreds of npm packages including n8n community nodes. This supply chain attack began in November 2025 and represents one of the fastest-spreading npm supply chain attacks on record. Notable victim: Trust Wallet (estimated $8.5M cryptocurrency loss, December 2025).
See Sha1-Hulud Supply Chain indicators for malicious packages, file-based indicators, and detection queries.
Trojanized n8n Packages
Baysec CTI identified the following malicious packages via OSV_DATABASE (Google Open Source Security, GHSA Malware, Amazon Inspector):
| Package | Malicious Version | Detection Date | Source |
|---|---|---|---|
| n8n-nodes-phoai-ultimate-tools | 32 versions (1.3.0–1.8.1) | 2025-11-26 | ghsa-malware |
| n8n-nodes-vercel-ai-sdk | 0.1.7 | 2025-11-26 | google-open-source-security, amazon-inspector |
| @hapheus/n8n-nodes-pgp | 1.5.1 | 2025-11-26 | google-open-source-security, ghsa-malware |
| n8n-nodes-tmdb | 0.5.1 | 2025-11-26 | google-open-source-security, ghsa-malware |
| n8n-nodes-viral-app | 0.2.5 | 2025-11-26 | google-open-source-security, amazon-inspector |
| n8n-nodes-performance-metrics | – | 2026-01-07 | ghsa-malware |
| n8n-performance-metrics | – | 2026-01-07 | ghsa-malware |
Worm Behavior
- Pre-install execution: Malicious
preinstallscript executes before any security scans - Bun runtime installation: Drops
setup_bun.jsto install Bun runtime if not present - Credential harvesting: Obfuscated
bun_environment.js(~480k lines) scans for npm tokens, GitHub PATs, AWS/GCP/Azure credentials, SSH keys - Exfiltration via GitHub: Stolen secrets published to public repos with description “Sha1-Hulud: The Second Coming”
- GitHub Actions backdoor: Creates self-hosted runner named “SHA1HULUD” and injects
.github/workflows/discussion.yamlwith command injection - Self-propagation: Publishes malicious versions of up to 100 packages owned by the victim
- Dead man’s switch: Threatens data destruction if exfiltration channels are severed
MITRE ATT&CK Mapping (Sha1-Hulud)
| Technique | ID | Description |
|---|---|---|
| Supply Chain Compromise | T1195 | Trojanized npm packages |
| Command and Scripting Interpreter: JavaScript | T1059.007 | Pre-install script execution |
| Credentials from Password Stores | T1555 | Harvests npm tokens, GitHub PATs, AWS keys |
| Ingress Tool Transfer | T1105 | Downloads additional payloads |
| Valid Accounts: Cloud Accounts | T1078.004 | Uses stolen credentials for persistence |
| Exfiltration Over Web Service: Exfiltration to Code Repository | T1567.001 | Publishes stolen secrets to GitHub |
Threat Activity
Exploitation Status
Public exploits are available and weaponized. Chocapikk released the PoC within 9 hours of disclosure, combining CVE-2026-21858 with CVE-2025-68613 for a full unauthenticated RCE chain.
Active Scanning: Baysec honeypots detected reconnaissance and scanning activity targeting n8n instances on port 5678, confirming that threat actors are actively probing for vulnerable deployments.
Confirmed Breaches: As of January 8, 2026, we have not identified any confirmed real-world breaches directly attributed to these n8n vulnerabilities. However, given the availability of public exploits, active scanning, and massive exposure, exploitation in the wild is highly probable. Organizations should assume unpatched instances may already be compromised.
Ransomware
We have not identified any ransomware victims linked to n8n CVEs so far. However, attackers who exploit workflow automation platforms for credential access often follow up with ransomware deployment. Baysec CTI is continuing to monitor for ransomware activity targeting n8n instances.
Internet Exposure
| Source | Count | Date | Notes |
|---|---|---|---|
| Censys | 103,476 | 2025-12-22 | CVE-2025-68613 vulnerable instances |
| Shodan | 71,118 | 2026-01-08 | product:n8n query |
| Shodan favicon | – | 2026-01-08 | http.favicon.hash:-831756631 |
| Shodan snapshot | 75,064 | 2026-01 | Independent verification |
| Cyera Research | ~100,000 | 2026-01 | CVE-2026-21858 global estimate |
| Censys (updated) | 26,512 | 2026-01-08 | Post-disclosure reduction |
Top countries: United States (7,079), Germany (4,280), France (2,655), Brazil (1,347), Singapore (1,129)
Top cloud providers: AWS, Google Cloud, Hetzner
Vulnerable versions observed in the wild:
- CVE-2026-21858: Versions 1.65.0 – 1.120.x (patched in 1.121.0)
- CVE-2025-68613: Versions 0.211.0 through 1.120.3, 1.121.0, and 1.122.x before patches
- Many exposed instances running outdated versions without recent security updates
Indicators of Compromise
Sha1-Hulud Supply Chain (High Priority)
Malicious npm packages - remove immediately if present:
| Package | Malicious Versions |
|---|---|
n8n-nodes-phoai-ultimate-tools | 32 versions (1.3.0–1.8.1) |
n8n-nodes-vercel-ai-sdk | 0.1.7 |
@hapheus/n8n-nodes-pgp | 1.5.1 |
n8n-nodes-tmdb | 0.5.1 |
n8n-nodes-viral-app | 0.2.5 |
n8n-nodes-performance-metrics | all |
n8n-performance-metrics | all |
File-based indicators:
| |
GitHub indicators:
- Self-hosted runner name:
SHA1HULUD - Malicious workflow:
.github/workflows/discussion.yaml - Repository description containing:
"Sha1-Hulud: The Second Coming"
Detection & Hunt Queries:
GitHub search for compromised repos:
| |
Local system indicators:
| |
GitHub audit log (organization):
- Self-hosted runners named “SHA1HULUD”
- Unexpected workflow files:
.github/workflows/discussion.yaml - New repos with “Sha1-Hulud” in description
Ni8mare (CVE-2026-21858) Exploitation Patterns (Network/WAF Detection)
HTTP request indicators:
| |
Detailed network indicators:
Content-Type: application/jsonon a Form/webhook endpoint expectingmultipart/form-data- JSON body containing
"files"array with"filepath"pointing to sensitive paths POST /webhook/*orPOST /form/*requests withContent-Type: application/jsoncontaining"files"object with path traversal patterns (../,/etc/,/home/node/.n8n/)- Large response bodies from webhook endpoints (indicating file exfiltration)
Target file paths in request body:
| |
Response indicators (successful exploitation):
- Unusually large response body (database exfiltration: 1MB+)
- SQLite file header in response:
SQLite format 3
User-Agent patterns observed in PoCs:
| |
Behavioral indicators (endpoint/workflow level):
- New workflows containing “Execute Command” or “Code” nodes created by unknown users
- Unexpected process spawns from the n8n service (e.g.,
/bin/sh,curl,wget) - Abnormal file access to
/home/node/.n8n/database.sqliteor/home/node/.n8n/config - Session cookie changes or new admin sessions from unfamiliar IPs
- Lateral movement attempts from n8n server to internal systems
CVE-2025-68613 (Expression Injection) Behavioral Indicators
Workflow-level detection patterns:
Malicious expression patterns in workflow configurations:
| |
Workflow audit queries:
Check workflow JSON for suspicious expression patterns:
| |
Runtime behavioral indicators:
- Unexpected child processes spawned by n8n (check
ps aux | grep n8n) - Outbound network connections to external IPs from n8n process
- File system modifications outside
/home/node/.n8n/directory - Execution of system commands (
sh,bash,curl,wget,nc) as child processes of n8n
Log patterns (n8n application logs):
- Expression evaluation errors mentioning
mainModule,require, orprocess - Workflow execution failures with sandbox escape error messages
- Unusual workflow execution times (complex evasion attempts take longer)
Mitigations
Detection Challenge: Ni8mare exploitation occurs in HTTP request bodies, which standard web server access logs don’t capture. Reliable detection requires inline network inspection (IDS/WAF) or reverse proxy request body logging-infrastructure most organizations don’t have at the n8n layer. Prioritize patching over detection.
Patching
Upgrade to fixed versions:
| Vulnerability | Minimum Safe Version | Recommended |
|---|---|---|
| CVE-2026-21858 | 1.121.0 | 2.0.0+ |
| CVE-2026-21877 | 1.121.3 | 2.0.0+ |
| CVE-2025-68613 | 1.120.4 / 1.121.1 / 1.122.0 | 2.0.0+ |
| CVE-2025-68668 | 2.0.0 | 2.0.0+ |
| CVE-2025-68697 | 2.0.0 | 2.0.0+ |
Why 2.0.0? Version 1.121.x patches the critical unauthenticated Ni8mare vulnerability, but CVE-2025-68668 (Pyodide sandbox escape) and CVE-2025-68697 (Legacy Code node) are only fixed in 2.0.0 via task-runner-based sandboxing. Organizations using Python Code nodes or legacy execution modes remain vulnerable until upgrading to 2.0.0+.
Temporary Workarounds
If patching requires delay:
For CVE-2026-21877 (Arbitrary File Write via Git node):
| |
Additionally: Limit untrusted user access to workflow creation/editing.
For CVE-2026-21858 (Unauthenticated RCE via webhooks):
Disable webhook/form nodes entirely:
| |
For CVE-2025-68613 and CVE-2025-68668 (Code execution nodes):
| |
Implementation:
- Docker Compose: Add to
environment:section indocker-compose.yml - Systemd: Add to
Environment=in service file (/etc/systemd/system/n8n.service) - npm/Direct Install: Add to
.envfile in n8n installation directory - IMPORTANT: Restart n8n after configuration changes (
docker compose restart/systemctl restart n8n/ restart process)
Configuration Hardening
Enable task-runner sandboxing (n8n 2.0.0+):
| |
References
Official Advisories
- CIRCL – CVE-2026-21858
- CIRCL – CVE-2026-21877
- CIRCL – CVE-2025-68613
- CIRCL – CVE-2025-68668
- GitHub Advisory – GHSA-v364-rw7m-3263 (CVE-2026-21877)
- GitHub Advisory – GHSA-v98v-ff95-f3cp (CVE-2025-68613)
- Canadian Cyber Centre – AV26-004
Vendor/Research Analysis
- Cyera Research Labs – Ni8mare Technical Analysis
- Orca Security – CVE-2025-68613 Analysis
- SOCRadar – CVE-2025-68613
- SOCRadar – CVE-2025-68668 Python Code Node
- Upwind – CVE-2026-21858 Assessment
- Resecurity – CVE-2025-68613 Analysis
- CSO Online – Critical RCE flaw in n8n
- n8n Commit Fix (CVE-2026-21877)
Supply Chain Attack Reports
- Datadog Security Labs – Shai-Hulud 2.0 Analysis
- Check Point – Shai-Hulud 2.0 Deep Dive
- Microsoft Security Blog – Shai-Hulud 2.0: Guidance for detecting, investigating, and defending
- GitLab Advisory – n8n-nodes-vercel-ai-sdk
- GitLab Advisory – n8n-nodes-tmdb
Media Coverage
- BleepingComputer – Max severity Ni8mare flaw
- TheHackerNews – Critical n8n Vulnerability (CVSS 10.0)
- SecurityAffairs – Ni8mare flaw
- CyberScoop – Researchers rush to warn defenders
Data Sources
Primary (Baysec CTI Platform):
- Baysec CTI: Vulnerability intelligence, Sha1-Hulud malicious package identification, threat actor attribution, MITRE ATT&CK mapping
- Baysec Vulnripper: n8n CVE inventory, patch tracking, affected version analysis
- Baysec Intelligence (AI): Threat correlation, timeline reconstruction, attribution analysis
Corroborating (External):
- Shodan: 71,118 exposed n8n instances (2026-01-08)
- Censys: 103,476 potentially vulnerable instances (2025-12-22)
- Shodan CVEDB: n8n vulnerability dashboard
Public PoCs
Warning: Verify all PoC code before execution. Threat actors actively distribute malware through fake exploit repositories on GitHub, targeting security researchers with lures for recent CVEs. In December 2025, we observed campaigns distributing Webrat RAT through weaponized PoC repos. Review code manually, run in isolated environments, and cross-reference with trusted sources. See our December 2025 Threats Summary for details.
| Repository | CVE | Description | Language | Activity |
|---|---|---|---|---|
| Chocapikk/CVE-2026-21858 | CVE-2026-21858 | Ni8mare – Unauthenticated file read → RCE chain | Python | 134⭐ 32 forks |
| Ashwesker/Ashwesker-CVE-2026-21858 | CVE-2026-21858 | Alternative Ni8mare exploit | – | 5⭐ |
| eduardorossi84/CVE-2026-21858-POC | CVE-2026-21858 | Ni8mare PoC | – | – |
| AbdulRKB/n8n-RCE | CVE-2026-21858 | n8n RCE exploit | Python | 2⭐ |
| wioui/n8n-CVE-2025-68613-exploit | CVE-2025-68613 | RCE exploit + scanner | Python | 82⭐ 22 forks |
| rxerium/CVE-2025-68613 | CVE-2025-68613 | Nuclei detection templates + exposure analysis | – | 29⭐ |
| Ashwesker/Ashwesker-CVE-2025-68613 | CVE-2025-68613 | Expression injection exploit | – | 24⭐ |
| hackersatyamrastogi/n8n-exploit-CVE-2025-68613-n8n-God-Mode-Ultimate | CVE-2025-68613 | “God Mode Ultimate” RCE exploit | Python | 18⭐ |
| TheStingR/CVE-2025-68613-POC | CVE-2025-68613 | Expression injection PoC + scanner | Python | 12⭐ |
| LingerANR/n8n-CVE-2025-68613 | CVE-2025-68613 | Lab environment to reproduce vulnerability | Python | 8⭐ |
| mbanyamer/n8n-Authenticated-Expression-Injection-RCE-CVE-2025-68613 | CVE-2025-68613 | Authenticated RCE PoC | Shell | 2⭐ |
| manyaigdtuw/CVE-2025-68613_Scanner | CVE-2025-68613 | GUI Shodan-powered scanner | Python | – |
| Shisui6/CVE-2025-68613 | CVE-2025-68613 | Expression injection PoC | Python | 3⭐ |
| DarkTigerET/CVE-2025-68613 | CVE-2025-68613 | Alternative exploit implementation | – | 1⭐ |
| imjdl/CVE-2025-68613-EXP | CVE-2025-68613 | n8n RCE exploit tool | Python | 4⭐ |
| Trickest CVE-2025-55526 | CVE-2025-55526 | Directory traversal exploit metadata | – | – |
Protect Your Infrastructure with Baysec Vulnripper
What is Vulnripper?
Vulnripper is an offline-first vulnerability intelligence tool for security teams managing self-hosted infrastructure. It provides instant CVE lookups, network scanning, and optional threat intelligence enrichment-all without requiring constant internet connectivity.
The n8n problem: Of the 100,000+ exposed n8n instances, most organizations didn’t know they were running vulnerable versions until exploitation began. Vulnripper would have flagged these automatically.
Key Capabilities
| Feature | Description |
|---|---|
| Vulnerability Database | Large database of known vulnerabilities updated from trusted security sources worldwide |
| Agent-Based Discovery and Scanning | Agents installed on your systems automatically discover software and analyze dependencies |
| Network Discovery and Scanning | Integrates with existing security tools for comprehensive coverage |
| IT Asset Inventory | Automatically discovers and tracks all IT assets – servers, applications, services, and software components |
| SCA, SBOM & Dependency Analysis | Performs software composition analysis to identify vulnerable dependencies |
| Always-On Monitoring | Continuously monitors for new vulnerabilities and software changes |
Why Vulnripper?
- Works completely offline if needed for air-gapped environments and penetration tests
- Connects to Baysec CTI services for enriched threat intelligence
- Easy deployment and installation - agents or network scanning without disrupting operations
- Clear reports that help security teams take action quickly
Plans
| Plan | Best For |
|---|---|
| Pro | Organizations needing vulnerability scanning and asset inventory |
| Intel | Organizations requiring full vulnerability intelligence and CTI integration with advanced threat correlation and trends |
Contact Us
Ready to identify vulnerabilities before attackers do?
- Email: kontakt@baysec.eu
- Phone: +48 786 432 409
- Website: baysec.eu