Security Vulnerability Report
中文
CVE-2026-42560 CVSS 9.1 CRITICAL

CVE-2026-42560

Published: 2026-05-09 06:16:11
Last Modified: 2026-05-11 18:16:36

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.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

No configuration data available.

go-pkgz/auth >= 1.18.0, < 1.25.2
go-pkgz/auth >= 2.0.0, < 2.1.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC Concept for CVE-2026-42560 * This demonstrates the vulnerable logic where all Patreon users * are mapped to the same local ID. */ package main import ( "fmt" "github.com/go-pkgz/auth" "github.com/go-pkgz/auth/provider" ) func main() { // Simulating the vulnerable behavior // In the vulnerable version, the provider might ignore the // unique ID returned by Patreon and return a constant. user1 := provider.User{Name: "Attacker", ID: "patreon_user_123"} user2 := provider.User{Name: "Victim", ID: "patreon_user_456"} // Vulnerable mapping logic (pseudo-code) vulnerableMapID := func(u provider.User) string { // BUG: Returns a hardcoded ID instead of u.ID return "hardcoded_local_user_id" } id1 := vulnerableMapID(user1) id2 := vulnerableMapID(user2) fmt.Printf("User1 Local ID: %s\n", id1) fmt.Printf("User2 Local ID: %s\n", id2) if id1 == id2 { fmt.Println("[!] Vulnerability Confirmed: Identity Confusion detected!") } }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42560", "sourceIdentifier": "[email protected]", "published": "2026-05-09T06:16:10.603", "lastModified": "2026-05-11T18:16:35.720", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-287"}]}], "references": [{"url": "https://github.com/go-pkgz/auth/commit/c0b15ee72a8401da83c01781c16636c521f42698", "source": "[email protected]"}, {"url": "https://github.com/go-pkgz/auth/releases/tag/v1.25.2", "source": "[email protected]"}, {"url": "https://github.com/go-pkgz/auth/releases/tag/v2.1.2", "source": "[email protected]"}, {"url": "https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42", "source": "[email protected]"}, {"url": "https://github.com/go-pkgz/auth/security/advisories/GHSA-f6qq-3m3h-4g42", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}