{"id":"EUVD-2026-28904","revision":null,"records":[{"revision":"c934149c7ef34879be5bcf9334c6e85a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-42560","aliases":[],"title":"auth: Patreon provider assigns the same local user ID to every authenticated Patreon account, enabling cross‑user impersonation","description":"auth provides authentication via oauth2, direct and email. From versions 1.18.0 to before 1.25.2 and 2.0.0 to before 2.1.2, 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. This issue has been patched in versions 1.25.2 and 2.1.2.","state":0,"publishedAt":"2026-05-09T04:15:01.408+00:00","modifiedAt":"2026-05-11T17:31:32.968+00:00","affected":[{"ecosystem":"Vendor product","name":"auth","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"go-pkgz\",\n                    \"product\": \"auth\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 1.18.0, < 1.25.2\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 2.0.0, < 2.1.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"severity":"CRITICAL"}],"references":["https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42","https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698","https://github.com/go-pkgz/auth/releases/tag/v1.25.2","https://github.com/go-pkgz/auth/releases/tag/v2.1.2"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-42560","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-42560","identifiers":["CVE-2026-42560"]},"retained":false,"historicalAffected":[]},{"revision":"24ec9d9b83d74bfdb8924d556e74aca9","observedAt":"2026-11-23T18:33:46.62+00:00","statement":{"source":"euvd","id":"EUVD-2026-28904","aliases":["CVE-2026-42560","GHSA-f6qq-3m3h-4g42"],"title":"auth provides authentication via oauth2, direct and email. From versions 1.18.0 to before 1.25.2 and 2.0.0 to before 2.1.2, the Patreon OAuth provider maps every authenticated Patreon account to the same local user.ID, instead of deriving a…","description":"auth provides authentication via oauth2, direct and email. From versions 1.18.0 to before 1.25.2 and 2.0.0 to before 2.1.2, 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. This issue has been patched in versions 1.25.2 and 2.1.2.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"severity":null}],"references":["https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42","https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698","https://github.com/go-pkgz/auth/releases/tag/v1.25.2","https://github.com/go-pkgz/auth/releases/tag/v2.1.2"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-28904","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 9, 2026, 4:15:01 AM","dateUpdated":"May 11, 2026, 5:31:32 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-28904","identifiers":["EUVD-2026-28904","CVE-2026-42560","GHSA-f6qq-3m3h-4g42"]},"retained":false,"historicalAffected":[]},{"revision":"9a8b844efce9432e868ee45cf0778d04","observedAt":"2026-10-25T10:17:15.856+00:00","statement":{"source":"nvd","id":"CVE-2026-42560","aliases":[],"title":"auth provides authentication via oauth2, direct and email. From versions 1.18.0 to before 1.25.2 and 2.0.0 to before 2.1.2, the Patreon OAuth provider maps every authenticated Patreon account to the same local user.ID, instead of deriving a…","description":"auth provides authentication via oauth2, direct and email. From versions 1.18.0 to before 1.25.2 and 2.0.0 to before 2.1.2, 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. This issue has been patched in versions 1.25.2 and 2.1.2.","state":0,"publishedAt":"2026-05-09T06:16:10.603+00:00","modifiedAt":"2026-07-24T21:10:00.143+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"severity":"CRITICAL"}],"references":["https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698","https://github.com/go-pkgz/auth/releases/tag/v1.25.2","https://github.com/go-pkgz/auth/releases/tag/v2.1.2","https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-42560","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-287"],"productCriteria":[],"sourceDates":{"published":"2026-05-09T06:16:10.603","lastModified":"2026-07-24T21:10:00.143"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-42560","identifiers":["CVE-2026-42560"]},"retained":false,"historicalAffected":[]},{"revision":"183aeb1ceea543b5a442c7d772218de9","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-f6qq-3m3h-4g42","aliases":["CVE-2026-42560","GO-2026-5348"],"title":"auth: Patreon provider assigns the same local user ID to every authenticated Patreon account, enabling cross‑user impersonation","description":"### Summary\nThe 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.\n\nIn 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.\n\n### Details\nThe bug is in the Patreon provider's user-mapping logic.\n\nBoth 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:\n\n```go\nmapUser: func(data UserData, bdata []byte) token.User {\n    userInfo := token.User{}\n\n    uinfoJSON := uinfo{}\n    if err := json.Unmarshal(bdata, &uinfoJSON); err == nil {\n        userInfo.ID = \"patreon_\" + token.HashID(sha1.New(), userInfo.ID)\n        userInfo.Name = uinfoJSON.Data.Attributes.FullName\n        userInfo.Picture = uinfoJSON.Data.Attributes.ImageURL\n        ...\n    }\n    return userInfo\n}\n```\n\nAffected locations:\n\n- `provider/providers.go:257`\n- `v2/provider/providers.go:257`\n\nAt that point, `userInfo.ID` is still the empty string, so the effective result is always:\n\n```text\npatreon_ + sha1(\"\")\n```\n\nwhich is:\n\n```text\npatreon_da39a3ee5e6b4b0d3255bfef95601890afd80709\n```\n\nfor every Patreon user.\n\nThe 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.\n\nWhy this matters:\n\n1. Patreon is a documented, supported provider.\n2. The library documents `token.User.ID` as the hashed user ID exposed to consumers.\n3. 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.\n\nRelevant flow in `v2`:\n\n- `v2/provider/oauth2.go:207` calls `u := p.mapUser(...)`\n- `v2/provider/oauth2.go:223` stores `u` in token claims\n- `v2/middleware/auth.go:154` copies `*claims.User` into request context\n\nThe existing tests already encode the broken behavior:\n\n- `provider/providers_test.go:179`\n- `provider/providers_test.go:204`\n- `v2/provider/providers_test.go:179`\n- `v2/provider/providers_test.go:204`\n\nThose tests assert the constant empty-string hash value for Patreon users.\n\n### PoC\nThis can be reproduced locally without contacting Patreon by exercising the provider's `mapUser` logic with two different Patreon payloads.\n\nFrom the repository root, create a temporary test file:\n\n`v2/provider/patreon_repro_test.go`\n\n```go\npackage provider\n\nimport \"testing\"\n\nfunc TestPatreonSharedIdentity(t *testing.T) {\n    r := NewPatreon(Params{\n        URL:     \"http://example.com\",\n        Cid:     \"cid\",\n        Csecret: \"secret\",\n    })\n\n    a := r.mapUser(UserData{}, []byte(`{\n        \"data\": {\n            \"attributes\": {\n                \"full_name\": \"Alice\",\n                \"image_url\": \"https://example.com/alice.png\"\n            },\n            \"id\": \"1111111\"\n        }\n    }`))\n\n    b := r.mapUser(UserData{}, []byte(`{\n        \"data\": {\n            \"attributes\": {\n                \"full_name\": \"Bob\",\n                \"image_url\": \"https://example.com/bob.png\"\n            },\n            \"id\": \"9999999\"\n        }\n    }`))\n\n    if a.ID != b.ID {\n        t.Fatalf(\"expected IDs to collide, got %q and %q\", a.ID, b.ID)\n    }\n\n    t.Logf(\"Alice -> %s\", a.ID)\n    t.Logf(\"Bob   -> %s\", b.ID)\n}\n```\n\nThen run:\n\n```bash\ncd v2\ngo test ./provider -run TestPatreonSharedIdentity -v\n```\n\nExpected result:\n\n```text\nAlice -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709\nBob   -> patreon_da39a3ee5e6b4b0d3255bfef95601890afd80709\n```\n\nI also confirmed this locally with three distinct Patreon `data.id` values; all of them produced the same `patreon_da39...` identity.\n\nYou can also see the same issue reflected in the existing built-in tests, which already assert this constant Patreon ID.\n\n### Impact\nThis is an authentication/identity-collision vulnerability in the Patreon provider.\n\nImpacted users:\n\n- applications using `github.com/go-pkgz/auth/provider.NewPatreon`\n- applications using `github.com/go-pkgz/auth/v2/provider.NewPatreon`\n- applications that rely on `token.User.ID` as the stable local account identifier, or use it to key roles, profiles, entitlements, subscription state, or other authorization-relevant records\n\nPractical impact:\n\n- all Patreon-authenticated users in the same application can collapse into the same local account\n- data associated with one Patreon user may be exposed to or overwritten by another Patreon user\n- Patreon-specific attributes such as `is_paid_sub` can leak across unrelated users\n- 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\n\n\n### Suggested Fix\nThe Patreon provider should derive the user ID from the Patreon account ID returned by Patreon, not from the uninitialized destination struct.\n\nIn both of these files:\n\n- `provider/providers.go`\n- `v2/provider/providers.go`\n\nchange:\n\n```go\nuserInfo.ID = \"patreon_\" + token.HashID(sha1.New(), userInfo.ID)\n```\n\nto:\n\n```go\nuserInfo.ID = \"patreon_\" + token.HashID(sha1.New(), uinfoJSON.Data.ID)\n```\n\nI would also recommend adding a regression test with at least two different Patreon `data.id` values and asserting that they produce different local IDs.\n\nBecause 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.","state":0,"publishedAt":"2026-04-30T20:47:24+00:00","modifiedAt":"2026-06-25T19:56:25.7285681+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-pkgz/auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.18.0"},{"kind":"fixed","version":"1.25.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-pkgz/auth/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.1.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42","https://nvd.nist.gov/vuln/detail/CVE-2026-42560","https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698","https://github.com/go-pkgz/auth","https://github.com/go-pkgz/auth/releases/tag/v1.25.2","https://github.com/go-pkgz/auth/releases/tag/v2.1.2"],"sourceUrl":"https://github.com/advisories/GHSA-f6qq-3m3h-4g42","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-f6qq-3m3h-4g42","identifiers":["GHSA-f6qq-3m3h-4g42","CVE-2026-42560","GO-2026-5348"]},"retained":false,"historicalAffected":[]},{"revision":"c39c308fbc954666bd1cafdb3a3fba51","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5348","aliases":["CVE-2026-42560","GHSA-f6qq-3m3h-4g42"],"title":"auth: Patreon provider assigns the same local user ID to every authenticated Patreon account, enabling cross‑user impersonation in github.com/go-pkgz/auth","description":"auth: Patreon provider assigns the same local user ID to every authenticated Patreon account, enabling cross‑user impersonation in github.com/go-pkgz/auth","state":0,"publishedAt":"2026-06-25T18:43:19+00:00","modifiedAt":"2026-06-25T19:45:31.9054275+00:00","affected":[{"ecosystem":"Go","name":"github.com/go-pkgz/auth","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"1.18.0"},{"kind":"fixed","version":"1.25.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/go-pkgz/auth/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.1.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42","https://nvd.nist.gov/vuln/detail/CVE-2026-42560","https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698","https://github.com/go-pkgz/auth/releases/tag/v1.25.2","https://github.com/go-pkgz/auth/releases/tag/v2.1.2"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5348","license":"OSV · upstream source license applies","key":"osv:GO-2026-5348","identifiers":["GO-2026-5348","CVE-2026-42560","GHSA-f6qq-3m3h-4g42"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T03:27:20.7872799+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0499364+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0499365+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-408d2d62e5e1ee202bc4ddcb36cdfc4163a3b9f625f656571d5227a756b73f22","complete":true,"records":430978,"lastAttemptAt":"2026-11-24T03:25:33.3876434+00:00","lastSuccessAt":"2026-11-24T03:25:33.3654925+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.3876434+00:00","snapshotPublishedAt":"2026-11-24T02:27:32+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2befaf4fce43427b8f2de0237aab55a0","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T03:37:23.6495493+00:00","lastSuccessAt":"2026-11-24T03:37:23.646+00:00","error":"403 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T03:37:23.646+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13203,"expectedIdentifiers":13982,"failedIdentifiers":403},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T03:27:20.7872799+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T03:27:20.7872799+00:00","lastSuccessAt":"2026-11-24T03:27:21.0510069+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:21.0510074+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-522bbc16b5764cfda6f3fb3dab5abf4a","complete":true,"records":13947,"lastAttemptAt":"2026-11-24T03:27:46.3160841+00:00","lastSuccessAt":"2026-11-24T03:27:46.312+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:46.312+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13982,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T03:27:20.7062774+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7062774+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T03:25:33.5302894+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:25:33.5302894+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T03:27:20.7276427+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.7276427+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-d1b862b4f381f96343318aa0a267adfdca63ec56238db239e6875bfd23f8318b","complete":true,"records":232938,"lastAttemptAt":"2026-11-24T03:27:20.5805435+00:00","lastSuccessAt":"2026-11-24T03:27:19.6143847+00:00","error":null,"lastVerifiedAt":"2026-11-24T03:27:20.5805435+00:00","snapshotPublishedAt":"2026-11-24T02:33:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}