/

CVE-2026-54305

Severity:

CRITICAL RISK

(9.9)

Access Control Flaws (CWE-284/200) in n8n Credentials

CVE-2026-54305

Analyzed

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-200, CWE-284

Impact:

Credential Hijacking and Data Exposure

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

n8n's Dynamic Credentials endpoints failed to enforce per-resource ownership and scope checks, allowing any authenticated user to interact with credentials and workflows they did not own.

Under these conditions, an attacker can enumerate private credential metadata, hijack OAuth tokens to run workflows under their own identity, or revoke tokens to disrupt automation, making any shared instance at risk.

Affected context

This vulnerability occurs in n8n environments where the Enterprise Dynamic Credentials feature is enabled and multiple users share the same instance.

The affected endpoints accept any authenticated n8n session, without verifying whether the caller has ownership or proper access to the target workflow or credential.

The risk is highest in multi-tenant or team deployments where users rely on shared infrastructure but expect strict isolation of their private workflows and stored OAuth credentials.

Exploit preconditions

  • Attack surface: n8n EE API endpoints backing the Dynamic Credentials feature.
  • Required access: Any valid authenticated n8n user account on the instance; no project membership or credential sharing relationship is required.
  • Trigger point: Requests to the vulnerable endpoints that enumerate credential references or initiate / revoke OAuth flows for credentials linked to private workflows.
  • Why exploitation is possible: The endpoints perform authentication but not fine-grained authorization, omitting ownership and scope checks on credentials and workflows, so the system incorrectly treats any logged-in user as allowed to act on those resources.

Why this happens

The underlying bug is a broken access control design: authentication was enforced, but authorization was not aligned with resource ownership.

Endpoints responsible for managing Dynamic Credentials trusted any authenticated session without verifying whether the caller actually had permission to access the associated workflow or credential.

This maps to CWE-284: Improper Access Control and CWE-200: Exposure of Sensitive Information, because credential metadata and control over OAuth tokens were exposed beyond intended scopes.

At an abstract level, the system failed to associate operations on credentials with a clear access policy tied to projects, sharing relationships, or user roles, leaving sensitive integration state broadly actionable.

Potential impact

  • Attackers can enumerate identifiers, names, and types of credentials referenced by any private workflow.
  • Attackers can hijack OAuth credentials so that affected workflows execute under accounts they control.
  • Sensitive data processed by workflows may be exfiltrated to attacker-controlled external services.
  • Revoked tokens can cause workflow failures, breaking automation and integrations.
  • Persistent takeover of integrations may occur until credentials are reconfigured or rotated.

General mitigation guidance

Effective mitigation focuses on enforcing strict, resource-level authorization and minimizing implicit trust in authenticated sessions.

Recommended design patterns include:

  • Apply ownership and scope checks on every endpoint that interacts with credentials, tokens, and workflows, ensuring callers have a legitimate relationship (e.g., project membership or explicit sharing).
  • Treat credential metadata and token management APIs as highly sensitive, restricting them to least-privilege roles and isolating them from generic authenticated access.
  • Model credentials as separate, access-controlled resources with explicit permissions, rather than inferring access from general user authentication.
  • Reduce trust in shared instances by segmenting tenants or projects and avoiding cross-tenant visibility for internal identifiers or integration details.
  • Implement secure-by-default behavior where new endpoints inherit conservative access policies and deny operations when ownership cannot be definitively established.

How teams detect issues like this

Detection typically involves both code-level and operational approaches:

  • Use static analysis or manual code review to flag endpoints that perform authentication but lack authorization checks tied to specific resources or scopes.
  • Review controller and service methods that handle credential or workflow references to ensure they consistently enforce project membership, sharing rules, and role-based access.
  • Establish API security policies requiring explicit authorization decisions for any operation involving credentials, tokens, or external integrations, and verify compliance during pull-request review.
  • Monitor logs for unusual patterns, such as non-owner users invoking credential-related endpoints or initiating OAuth flows for resources they do not typically use.
  • Employ application security testing tools that exercise authenticated endpoints with varying identities to validate that access is properly constrained.

Sources

SourceLink
github.comgithub.com/n8n-io/n8n/security/advisories/GHSA-2j5h-858j-5mpf

Frequently asked

questions

Any user with a valid authenticated account on the affected n8n instance can potentially target credentials referenced by private workflows, even without being part of the relevant project or sharing group.

The attacker must be able to log in to n8n, but does not need elevated roles, project membership, or explicit credential sharing; a basic authenticated session is sufficient.

The safest approach is to enforce strict authorization checks on all credential and workflow-related endpoints, ensuring operations are allowed only when the caller has a verified ownership or sharing relationship with the target resource, and to treat credential actions as privileged operations.

Adopt a robust access control model that separates authentication from authorization, require resource-level permission checks for sensitive APIs, standardize reusable authorization middleware, and include access control review as a mandatory step in code review and security testing processes.

Find out what's already
exploitable in your codebase.