n8n: uninitialized buffer leaks secrets via Task Runner
Authenticated n8n users with workflow edit rights can read raw Node.js process memory — including API keys, tokens, and secrets from other workflows — by allocating uninitialized buffers in the JavaScript Task Runner. This is a one-liner exploit for any insider or compromised account. Upgrade to 1.123.22/2.9.3/2.10.1 immediately and audit who holds workflow editor permissions today.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| n8n | npm | < 1.123.22 | 1.123.22 |
Do you use n8n? You're affected.
Severity & Risk
Recommended Action
- 1. PATCH: Upgrade n8n to 1.123.22 (v1 branch), 2.9.3, or 2.10.1 — fixes are available across all active release lines.
- 2. DETECT: Audit N8N_RUNNERS_ENABLED=true instances across your environment; prioritize those with untrusted or broad workflow editor access.
- 3. WORKAROUND (if patching is delayed): Restrict workflow creation/editing to explicitly trusted users via n8n's role-based access controls.
- 4. ISOLATE: Switch to external runner mode (N8N_RUNNERS_MODE=external) to limit memory exposure to the runner subprocess only.
- 5. ROTATE: Assume any API keys, tokens, or credentials processed by affected n8n instances may be compromised — rotate proactively.
- 6. MONITOR: Review workflow audit logs for unexpected JavaScript buffer allocations or anomalous large buffer reads in Task Runner steps.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
n8n is an open source workflow automation platform. Prior to versions 1.123.22, 2.9.3, and 2.10.1, an authenticated user with permission to create or modify workflows could use the JavaScript Task Runner to allocate uninitialized memory buffers. Uninitialized buffers may contain residual data from the same Node.js process — including data from prior requests, tasks, secrets, or tokens — resulting in information disclosure of sensitive in-process data. Task Runners must be enabled using `N8N_RUNNERS_ENABLED=true`. In external runner mode, the impact is limited to data within the external runner process. The issue has been fixed in n8n versions 1.123.22, 2.10.1 , and 2.9.3. Users should upgrade to this version or later to remediate the vulnerability. If upgrading is not immediately possible, administrators should consider the following temporary mitigations: Limit workflow creation and editing permissions to fully trusted users only, and/or use external runner mode (`N8N_RUNNERS_MODE=external`) to isolate the runner process. These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Exploitation Scenario
An attacker with a low-privilege n8n account (or a compromised employee account with 'editor' rights) creates a new workflow containing an Execute Code node backed by the JavaScript Task Runner. The payload is trivial: `const buf = Buffer.allocUnsafe(1024 * 1024); return buf.toString('utf8');`. Executed repeatedly, this reads megabytes of uninitialized Node.js heap memory populated by prior workflow runs. In an AI orchestration environment, this memory likely contains plaintext API keys for OpenAI/Anthropic (from credential store hydration), database connection strings used by AI data ingestion workflows, and session tokens from user-authenticated webhook triggers. The attacker can exfiltrate these credentials to pivot laterally into LLM services, AI databases, or upstream SaaS integrations — all without leaving obvious traces in n8n's execution logs.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N References
- docs.n8n.io/hosting/configuration/task-runners
- docs.n8n.io/hosting/securing/blocking-nodes
- github.com/advisories/GHSA-xvh5-5qg4-x9qp
- github.com/n8n-io/n8n/security/advisories/GHSA-xvh5-5qg4-x9qp
- docs.n8n.io/hosting/configuration/task-runners Product
- docs.n8n.io/hosting/configuration/task-runners Product
- docs.n8n.io/hosting/securing/blocking-nodes Product
- docs.n8n.io/hosting/securing/blocking-nodes Product
- github.com/n8n-io/n8n/security/advisories/GHSA-xvh5-5qg4-x9qp Vendor Mitigation
- github.com/n8n-io/n8n/security/advisories/GHSA-xvh5-5qg4-x9qp Vendor Mitigation
AI Threat Alert