CVE-2026-42560 is a critical-severity (CVSS 9.1) Improper Authentication vulnerability in github.com/go-pkgz/auth. A fix is available for github.com/go-pkgz/auth — see the affected versions and patch details below.
auth: Patreon provider assigns the same local user ID to every authenticated Patreon account, enabling cross‑user impersonation
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-42560.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-42560 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,567 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/go-pkgz/auth🐹github.com/go-pkgz/auth/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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_da39a3ee5e6b4b0d3255bfef95601890afd80709
for 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 -v
Expected result:
Alice -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709
Bob -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709
I also confirmed this locally with three distinct Patreon data.id values; all of them produced the same patreon_da39... identity.
You can also see the same issue 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)
I would also recommend adding a regression test with at least two different Patreon data.id values and asserting that they produce different local IDs.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/go-pkgz/auth | ≥ 1.18.0&&< 1.25.2 | 1.25.2go get github.com/go-pkgz/auth@v1.25.2 |
| 🐹Go | github.com/go-pkgz/auth/v2 | ≥ 2.0.0&&< 2.1.2 | 2.1.2go get github.com/go-pkgz/auth/v2@v2.1.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/go-pkgz/auth, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/go-pkgz/auth to 1.25.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-42560 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-42560 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-42560. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-42560 in your dependencies?
O3 Security finds CVE-2026-42560 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.