/

CVE-2026-42560

Severity:

CRITICAL RISK

(9.1)

Improper Authentication in Patreon OAuth Provider

CVE-2026-42560

Deferred

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Account Impersonation and Cross-Account Data Exposure

Severity:

CRITICAL RISK

(9.1)

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

The Patreon OAuth provider in the auth library incorrectly maps every authenticated Patreon account to the same local user ID, collapsing all Patreon users into a single identity.

Applications that treat token.User.ID as a unique, stable account key may unintentionally merge unrelated Patreon users, leading to cross-account access, privilege confusion, and leakage of subscription or profile data.

Affected context

This vulnerability affects applications that integrate the Patreon OAuth provider from the auth library versions 1.18.0 to <1.25.2 and 2.0.0 to <2.1.2.

It is particularly impactful where:

  • Patreon OAuth is enabled as a login or linking mechanism
  • The application uses token.User.ID (or its equivalent) as the canonical account identifier
  • Authorization decisions, profile linkage, or subscription checks are based on that ID

Under these conditions, multiple distinct Patreon users can be mapped to the same internal account, causing their sessions and data to overlap.

Exploit preconditions

  • Attack surface: Any application endpoint that accepts Patreon OAuth login or account linking via the affected library.
  • Required access: Ability to authenticate with a Patreon account; no special privileges on the target application are inherently required.
  • Trigger point: Completing the OAuth flow with Patreon so that the application processes the returned token and user identity.
  • Why exploitation is possible: The provider derives a non-unique local user ID for Patreon accounts, effectively reusing the same ID for all users, so an attacker's session is bound to the same local identity as other Patreon-authenticated users.

Why this happens

The root cause lies in improper authentication handling and identity mapping within the Patreon OAuth provider.

Instead of deriving a stable, unique local identifier from Patreon-specific attributes (such as the provider name plus Patreon user ID), the implementation assigns the same local user.ID to every Patreon-authenticated user.

This behavior maps to CWE-287: Improper Authentication, because the application cannot reliably distinguish between different authenticated principals and therefore misattributes sessions and permissions.

Abstractly, the insecure pattern is: treating a shared or constant identifier as the primary key for multiple identities in an authentication system, causing identity collisions and incorrect authorization decisions.

Potential impact

  • Patreon users may gain access to another Patreon user's account data within the application.
  • Cross-account leakage of subscription status, entitlements, or purchase history may occur.
  • Privilege confusion can allow a lower-privileged user to inherit higher-privileged roles or capabilities tied to the shared local account.
  • Audit logs and access records can become unreliable or meaningless, since multiple users appear as the same local identity.
  • Downstream systems relying on the local user ID for billing, licensing, or feature flags can make incorrect decisions.

General mitigation guidance

Mitigation centers on correcting identity mapping and hardening authentication flows to ensure uniqueness and proper binding of external identities:

  • Introduce a deterministic, unique user identifier for each OAuth provider, typically by combining the provider name with the provider-specific user ID.
  • Enforce a one-to-one or explicitly defined many-to-one mapping between external identities (Patreon accounts) and internal accounts, with clear linking flows and user consent.
  • Treat provider-specific IDs as the canonical reference for external identities, rather than a shared or placeholder value.
  • Isolate authorization logic so it uses well-defined, unique principal identifiers, and avoid reusing placeholder tokens or IDs across users.
  • Apply least-privilege principles when binding OAuth identities to roles or entitlements to reduce the blast radius if identity mapping issues arise.

How teams detect issues like this

Detection can leverage a combination of code-centric and behavior-centric approaches:

  • Static analysis and code review:
  • Look for OAuth providers that assign constant or hard-coded user IDs, or that ignore provider-specific IDs when constructing local identities.
  • Flag authentication code paths where multiple external identities are intentionally or unintentionally mapped to the same internal account key without explicit policy.
  • Review the implementation of token.User.ID (or equivalent) to ensure it incorporates provider-specific identifiers.
  • Runtime and log analysis:
  • Monitor authentication logs for patterns where different Patreon accounts (distinct external user IDs) appear as the same local user ID.
  • Analyze audit trails for unusually high activity or diverse IP/user agent patterns on a single local account tied to Patreon OAuth.
  • Policy enforcement:
  • Enforce architectural policies that require unique principal identifiers per external identity provider.
  • Integrate automated checks in CI/CD to detect and prevent new authentication integrations from reusing static or shared IDs.

Sources

SourceLink
github.comgithub.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698
github.comgithub.com/go-pkgz/auth/releases/tag/v1.25.2
github.comgithub.com/go-pkgz/auth/releases/tag/v2.1.2
github.comgithub.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42

Frequently asked

questions

Any user with a Patreon account who can log in through the affected OAuth provider can potentially be mapped onto the same local identity as other Patreon-authenticated users, making exploitation possible wherever the integration is deployed.

The attacker only needs access to a valid Patreon account and the ability to use the Patreon OAuth login within the target application; no prior account on the application or elevated privileges are inherently required.

Implement a unique, deterministic mapping from each Patreon account to a distinct internal user identifier, typically by incorporating provider-specific user IDs and ensuring that token.User.ID (or its equivalent) cannot be shared across unrelated users.

Standardize authentication design so each external identity provider produces a unique principal identifier, enforce strict reviews of authentication and identity-mapping code, and adopt testing or tooling that validates that different external users cannot collapse into the same internal account without an intentional and well-documented account-linking process.

Find out what's already
exploitable in your codebase.