go-pkgz/auth CVE-2026-42560
CRITICALAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker authenticates via Patreon OAuth
-
DeliveryLibrary assigns collision ID patreon_da39a3ee...
-
ExploitApplication stores session with shared identity
-
ExecutionVictim authenticates via Patreon
-
PersistApplication overwrites or merges victim data
-
ImpactAttacker gains access to victim account data and privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication mechanism validation
MITRE ATT&CK
2 techniques across 2 tactics: Defense Evasion, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Remote unauthenticated exploitation against default configurations of go-pkgz/auth when the Patreon OAuth provider is enabled. No special configuration, non-default settings, or privileged access is required - the vulnerable code path executes during normal Patreon authentication flows. However, exploitation impact only manifests in applications meeting three prerequisites: (1) the application must use the Patreon provider from go-pkgz/auth versions 1.18.0-1.25.1 or v2 2.0.0-2.1.1, (2) the application must treat token.User.ID as the stable account key for user sessions, data storage, or authorization decisions, and (3) the application must have at least two distinct Patreon users attempting authentication (single-user deployments would not experience cross-account access). The CVSS vector AV:N/AC:L/PR:N/UI:N accurately represents that no authentication or interaction barriers exist, but exploitation is self-limiting: attackers must be legitimate Patreon users of the target application to trigger the vulnerable code path. Applications using other OAuth providers from the same library (Google, GitHub, Facebook) are not affected by this specific flaw. |
| Impact | This is a critical authentication bypass with CVSS 9.1 (AV:N/AC:L/PR:N/UI:N) indicating remote unauthenticated exploitation against default configurations. However, real-world risk is narrowly scoped to applications meeting three specific criteria: (1) use the Patreon provider from go-pkgz/auth, (2) rely on token.User.ID as the canonical account identifier, and (3) have multiple Patreon users. The CVSS vector accurately reflects exploitability - any remote attacker can authenticate via Patreon and gain access to the shared identity without privileges or user interaction. The High confidentiality and integrity impact is realistic for affected applications, as users can access each other's data and privileges. No EPSS score is available for this recently disclosed CVE, and CISA KEV status is negative, indicating no confirmed widespread exploitation. The vulnerability was responsibly disclosed by the maintainers themselves via GitHub Security Advisory GHSA-f6qq-3m3h-4g42, suggesting detection through internal review rather than active exploitation. The existing test suite inadvertently encoded the broken behavior by asserting the constant collision value, indicating the bug was longstanding but undetected. The combination of network attack vector, low complexity, and no authentication requirement makes this a genuine priority for the narrow set of affected deployments, but the small ecosystem footprint (Go library for Patreon OAuth) limits overall internet-wide impact compared to widely deployed products. Security teams should assess whether they use Patreon authentication via this specific library - if not, this CVE is not relevant despite the high CVSS score. |
| Exploit ScenarioDerived | Alice and Bob both authenticate to a web application using their Patreon accounts via the vulnerable go-pkgz/auth library. The OAuth flow completes successfully for both, but the library assigns them the identical local user ID patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709. The application stores user preferences and subscription status keyed by this ID. When Alice logs in and updates her profile, the database overwrites Bob's profile data because they share the same user.ID. Later, Bob authenticates and receives Alice's JWT token claims, gaining access to her account data and any Patreon-linked privileges such as premium content access flags. If the application granted admin rights to the collapsed account based on one user's Patreon tier, both users inherit those rights. The vulnerability is trivially reproducible without specialized tools - any two Patreon users authenticating to the same affected application will demonstrate the identity collision. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 30, 2026
Identity collision in the go-pkgz/auth Patreon OAuth provider allows any Patreon-authenticated user to impersonate every other Patreon user in the same application. The Patreon provider hashes an uninitialized variable instead of the actual Patreon account ID, assigning the constant value patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709 to all users. Applications using token.User.ID as the stable account key can experience cross-account access, privilege escalation, and data leakage. Vendor-released patch available in versions 1.25.2 and 2.1.2. No evidence of active exploitation or public POC beyond the vendor's disclosure, but the vulnerability is trivially exploitable with remote unauthenticated access to any affected application.
RemediationAI
Upgrade to go-pkgz/auth version 1.25.2 (for root module users) or version 2.1.2 (for v2 module users). The vendor-released patch (commit c0b15ee72a8401da83c01781c16636c521f42698) corrects the variable reference from userInfo.ID to uinfoJSON.Data.ID in the Patreon provider's mapUser function, ensuring each Patreon account receives a unique local identifier. Download patched releases from https://github.com/go-pkgz/auth/releases/tag/v1.25.2 or https://github.com/go-pkgz/auth/releases/tag/v2.1.2. For applications that cannot immediately upgrade, disable the Patreon authentication provider entirely and redirect Patreon users to alternative OAuth providers (Google, GitHub, etc.) until patching is complete; this prevents further identity collisions but does not remediate existing collapsed accounts. Organizations with existing Patreon-linked accounts will need data migration: the patch changes the hash input, so previously created accounts under the collision ID (patreon_da39a3ee...) must be manually split and re-associated with correct Patreon user IDs, which may require out-of-band identity verification. No automated migration tooling is provided by the vendor, and the advisory notes this complexity. The side effect of patching is that existing Patreon users will not automatically recognize their old session tokens and may need to re-authenticate, but this is unavoidable given the broken identity foundation.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The go-pkgz/auth library is a Go authentication middleware supporting multiple OAuth2 providers including Patreon. The bug resides in the Patreon provider's mapUser function at provider/providers.go:257 and v2/provider/providers.go:257. The code attempts to derive a unique local user ID by hashing the Patreon account ID, but due to a variable reference error, it hashes userInfo.ID before that field is populated, resulting in hashing the empty string. The SHA1 hash of an empty string is always da39a3ee5e6b4b0d3255bfef95601890afd80709, which is then prefixed with patreon_ and used as the stable user identifier. This represents a CWE-287 (Improper Authentication) flaw where the authentication mechanism fails to uniquely identify users. The OAuth flow stores this incorrect user object in JWT claims, and downstream middleware injects it into request context, causing all consuming code to treat distinct Patreon users as a single local account. Both the root module (github.com/go-pkgz/auth) and v2 module (github.com/go-pkgz/auth/v2) are affected, with vulnerable version ranges of 1.18.0-1.25.1 and 2.0.0-2.1.1 respectively.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Primary rating from Vendor (https://github.com/go-pkgz/auth).
CVSS VectorVendor: https://github.com/go-pkgz/auth
Lifecycle Timeline
2DescriptionCVE.org
Summary
The Patreon OAuth provider maps every authenticated Patreon account to the same local user.ID, instead of deriving a unique ID from the Patreon account returned by Patreon.
In practice, this means all Patreon-authenticated users of an application using this library are collapsed into a single local identity. Any application that trusts token.User.ID as the stable account key can end up mixing or fully merging unrelated Patreon users, which can lead to cross-account access, privilege confusion, and subscription-state leakage.
Details
The bug is in the Patreon provider's user-mapping logic.
Both the root module and the v2 module create a fresh empty token.User{} and then derive the Patreon ID from userInfo.ID before that field has been populated:
mapUser: func(data UserData, bdata []byte) token.User {
userInfo := token.User{}
uinfoJSON := uinfo{}
if err := json.Unmarshal(bdata, &uinfoJSON); err == nil {
userInfo.ID = "patreon_" + token.HashID(sha1.New(), userInfo.ID)
userInfo.Name = uinfoJSON.Data.Attributes.FullName
userInfo.Picture = uinfoJSON.Data.Attributes.ImageURL
...
}
return userInfo
}Affected locations:
provider/providers.go:257v2/provider/providers.go:257
At that point, userInfo.ID is still the empty string, so the effective result is always:
patreon_ + sha1("")which is:
patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709for every Patreon user.
The code appears to have intended to hash the Patreon user ID returned by Patreon, i.e. uinfoJSON.Data.ID, but instead hashes the uninitialized destination field.
Why this matters:
- Patreon is a documented, supported provider.
- The library documents
token.User.IDas the hashed user ID exposed to consumers. - The OAuth flow stores the mapped user object in JWT claims, and middleware later injects that object into the request context verbatim, consuming handlers receive the provider's wrong user.ID as authoritative identity.
Relevant flow in v2:
v2/provider/oauth2.go:207callsu := p.mapUser(...)v2/provider/oauth2.go:223storesuin token claimsv2/middleware/auth.go:154copies*claims.Userinto request context
The existing tests already encode the broken behavior:
provider/providers_test.go:179provider/providers_test.go:204v2/provider/providers_test.go:179v2/provider/providers_test.go:204
Those tests assert the constant empty-string hash value for Patreon users.
PoC
This can be reproduced locally without contacting Patreon by exercising the provider's mapUser logic with two different Patreon payloads.
From the repository root, create a temporary test file:
v2/provider/patreon_repro_test.go
package provider
import "testing"
func TestPatreonSharedIdentity(t *testing.T) {
r := NewPatreon(Params{
URL: "http://example.com",
Cid: "cid",
Csecret: "secret",
})
a := r.mapUser(UserData{}, []byte(`{
"data": {
"attributes": {
"full_name": "Alice",
"image_url": "https://example.com/alice.png"
},
"id": "1111111"
}
}`))
b := r.mapUser(UserData{}, []byte(`{
"data": {
"attributes": {
"full_name": "Bob",
"image_url": "https://example.com/bob.png"
},
"id": "9999999"
}
}`))
if a.ID != b.ID {
t.Fatalf("expected IDs to collide, got %q and %q", a.ID, b.ID)
}
t.Logf("Alice -> %s", a.ID)
t.Logf("Bob -> %s", b.ID)
}Then run:
cd v2
go test ./provider -run TestPatreonSharedIdentity -vExpected result:
Alice -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709
Bob -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709This was confirmed locally with three distinct Patreon data.id values; all of them produced the same patreon_da39... identity.
The same issue is reflected in the existing built-in tests, which already assert this constant Patreon ID.
Impact
This is an authentication/identity-collision vulnerability in the Patreon provider.
Impacted users:
- applications using
github.com/go-pkgz/auth/provider.NewPatreon - applications using
github.com/go-pkgz/auth/v2/provider.NewPatreon - applications that rely on
token.User.IDas the stable local account identifier, or use it to key roles, profiles, entitlements, subscription state, or other authorization-relevant records
Practical impact:
- all Patreon-authenticated users in the same application can collapse into the same local account
- data associated with one Patreon user may be exposed to or overwritten by another Patreon user
- Patreon-specific attributes such as
is_paid_subcan leak across unrelated users - if a target application grants any elevated privileges to the local account keyed by this shared Patreon ID, those privileges can effectively apply to every Patreon login
Suggested Fix
The Patreon provider should derive the user ID from the Patreon account ID returned by Patreon, not from the uninitialized destination struct.
In both of these files:
provider/providers.gov2/provider/providers.go
change:
userInfo.ID = "patreon_" + token.HashID(sha1.New(), userInfo.ID)to:
userInfo.ID = "patreon_" + token.HashID(sha1.New(), uinfoJSON.Data.ID)The addition of regression testing with at least two different Patreon data.id values and asserting that they produce different local IDs is recommended.
Because the current bug causes all Patreon users to share a single local ID, maintainers may also want to consider migration guidance for consumers who already have Patreon-linked local accounts created under the broken identifier.
Executive ViewAI
CVE-2026-42560 is a critical authentication bypass in go-pkgz/auth's Patreon OAuth provider that collapses all user identities to a single constant, allowing any Patreon user to impersonate all other users in affected applications. Organizations using this library for user authentication face immediate risk of unauthorized account access, privilege escalation, and data compromise across their user base.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)CVE.org
Same weakness CWE-287 – Improper Authentication
View allSame technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Critical| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
GHSA-f6qq-3m3h-4g42
NVD
CVE.org
EPSS
Exploit-DB