6 Days to the Dec 11 gpt-5/o3 Cutoff + Post-CVE-2026-21858 n8n Hardening: Auditing Self-Hosted AI Workflows A developer published a hardening baseline for self-hosted n8n deployments and 24/7 AI agents ahead of the December 11 gpt-5/o3 model cutoff and in response to CVE-2026-21858 ("Ni8mare"), citing a $740k LLMjacking wave on leaked workspace credentials. The baseline pins n8nio/n8n 2.1.4 or later, disables executeCommand, readWriteFile and localFileTrigger nodes, blocks env and file access in expressions, enforces execution timeouts, and binds port 5678 to localhost behind a TLS reverse proxy with webhook HMAC verification. The developer also released a zero-dependency Node script that scans exported workflow.json files for hardcoded gpt-5/o3 model IDs, plaintext API keys, unauthenticated webhooks wired to LLM nodes, and high-blast-radius nodes, plus open-sourced MIT-licensed Railway/Docker templates and a browser-side workflow scanner. If you self-host n8n or run 24/7 AI agents wired to public webhooks, two separate headaches are converging in December 2026: gpt-5 / o3 model cutoff : workflow.json files, LangChain nodes, and agent proxies will start throwing 404/deprecation failures in production if you haven't audited your workflow JSONs yet. CVE-2026-21858 "Ni8mare" CVE-2025-68613 CVE-2026-1470 CVE-2026-145077 $740k LLMjacking wave on leaked workspace credentials, the default docker run n8nio/n8n setup with open webhooks and unconstrained LLM keys is an open wallet. Here is the concrete, zero-fluff hardening baseline we now enforce across self-hosted n8n & agent stacks. Dockerfile Baseline n8nio/n8n = 2.1.4 Pinning a patched image is step one, but disabling high-blast-radius nodes, blocking env/file reads inside expressions, and enforcing execution timeouts cuts off the most common post-compromise pivots: js FROM n8nio/n8n:2.1.4 Block expression env-var leakage, local file reads, and shell RCE nodes ENV N8N BLOCK ENV ACCESS IN NODE=true \ N8N BLOCK FILE ACCESS TO N8N FILES=true \ N8N ENFORCE SETTINGS FILE PERMISSIONS=true \ N8N DIAGNOSTICS ENABLED=false \ N8N METRICS=false \ EXECUTIONS TIMEOUT=300 \ EXECUTIONS TIMEOUT MAX=600 \ EXECUTIONS DATA PRUNE=true \ EXECUTIONS DATA MAX AGE=168 \ NODES EXCLUDE=' "n8n-nodes-base.executeCommand","n8n-nodes-base.localFileTrigger","n8n-nodes-base.readWriteFile" ' Bind n8n only to localhost behind Caddy/reverse-proxy never 0.0.0.0:5678 directly EXPOSE 5678 HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \ CMD wget -qO- http://127.0.0.1:${N8N PORT:-5678}/healthz || exit 1 Pair this with a startup entrypoint guard that refuses to boot unless N8N ENCRYPTION KEY is at least 32 characters preventing silently weak or ephemeral credential encryption on container restarts , and bind port 5678 to 127.0.0.1:5678:5678 in docker-compose.yml behind a TLS reverse proxy that verifies webhook HMAC signatures and rate-limits bursts. Before December 11, run a quick local scan across your exported workflow.json files or repo to catch four things in one pass: o3-mini that will break on Dec 11. n8n-nodes-base.webhook triggers authentication: "none" connected directly to LLM nodes without max tokens or rate limiting. sk-proj- , sk-ant- , AIza , ghp stored in node parameters instead of encrypted n8n credentials. executeCommand / readWriteFile nodes. Quick zero-dependency local audit across exported n8n workflow JSONs node -e ' const fs = require "fs" ; for const file of process.argv.slice 1 { const wf = JSON.parse fs.readFileSync file, "utf8" ; const raw = JSON.stringify wf ; const findings = ; if /"model"\s :\s " gpt-5|o3 -preview|-mini ?"/i.test raw findings.push "DEC-11 MODEL CUTOFF: hardcoded gpt-5/o3 model ID" ; if / sk-proj-|sk-ant-|AIza 0-9A-Za-z - {20} /.test raw findings.push "CRITICAL: plaintext API key inside workflow JSON" ; for const n of wf.nodes || { if n.type === "n8n-nodes-base.webhook" && n.parameters?.authentication || n.parameters.authentication === "none" findings.push UNAUTH WEBHOOK: ${n.name} Denial-of-Wallet risk if wired to LLM ; if /executeCommand|readWriteFile/i.test n.type || "" findings.push HIGH-BLAST NODE: ${n.name} ${n.type} ; } console.log file, "- ", findings.length ? findings : "PASS" ; } ' ./workflows/ .json Never hand a 24/7 autonomous agent a raw unlimited OpenAI/Anthropic key. Put a lightweight reverse proxy between the agent and upstream LLM APIs that: $15/day , We open-sourced two minimal MIT Railway/Docker templates implementing these exact guardrails, plus a 100% browser-side workflow.json security scanner & self-hosting TCO router Railway vs Hostinger vs Vultr vs Hetzner vs n8n Cloud vs Make.com : Disclosure: the browser scanner, TCO router, and both Railway starter repos are completely free/MIT. We offer optional $39/$49/$99 production agency packs on StackBay with queue-mode Postgres+Redis compose, Caddy HMAC webhook shield, encrypted S3/R2 backups, and LiteLLM kill-switch configs.