CVE-2026-33544: Github.com/steveiliop56/tinyauth Tinyauth Has OAuth Account Confusion Vulnerability

HIGH
Advisory Identifier: GHSA-9q5m-jfc4-wc92
CVSS 7.7
CWE-362
Published
Advisory Summary

CVE-2026-33544 is a HIGH (CVSS 7.7) tinyauth has oauth account confusion vulnerability (CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')) affecting Github.com/steveiliop56/tinyauth libraries in the Go ecosystem. The issue involves tinyauth has oauth account confusion via shared mutable state on singleton service instances. Remediation is available by upgrading affected packages to version 1.0.1-0.20260401140714-fc1d4f2082a5.

CVE-2026-33544 at a Glance

CVE Identifier CVE-2026-33544
GHSA Identifier GHSA-9q5m-jfc4-wc92
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Affected Product Github.com/steveiliop56/tinyauth
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-33544

To remediate this vulnerability, upgrade all affected Github.com/steveiliop56/tinyauth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/steveiliop56/tinyauth fixed: 1.0.1-0.20260401140714-fc1d4f2082a5
Upgrade github.com/steveiliop56/tinyauth to 1.0.1-0.20260401140714-fc1d4f2082a5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/steveiliop56/tinyauth

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33544, inspect your project dependencies for Github.com/steveiliop56/tinyauth:

inspect dependencies for github.com/steveiliop56/tinyauth

Analyze the terminal output to locate any version of Github.com/steveiliop56/tinyauth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1-0.20260401140714-fc1d4f2082a5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition'), where the product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. In Github.com/steveiliop56/tinyauth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary All three OAuth service implementations (`GenericOAuthService`, `GithubOAuthService`, `GoogleOAuthService`) store PKCE verifiers and access tokens as mutable struct fields on singleton instances shared across all concurrent requests. When two users initiate OAuth login for the same provider concurrently, a race condition between `VerifyCode()` and `Userinfo()` causes one user to receive a session with the other user's identity. ### Details The [`OAuthBrokerService.GetService()`](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/oauth_broker_service.go#L70-L72) returns a single shared instance per provider for every request. The OAuth flow stores intermediate state as struct fields on this singleton: **Token storage** — [`generic_oauth_service.go` line 96](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/generic_oauth_service.go#L96): ```go generic.token = token // Shared mutable field on singleton ``` **Verifier storage** — [`generic_oauth_service.go` line 81](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/generic_oauth_service.go#L81): ```go generic.verifier = verifier // Shared mutable field on singleton ``` In the callback handler [`oauth_controller.go` lines 136–143](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/controller/oauth_controller.go#L136-L143), the code calls: ```go err = service.VerifyCode(code) // line 136 — stores token on singleton // ... race window ... user, err := controller.broker.GetUser(req.Provider) // line 143 — reads token from singleton ``` Between these two calls, a concurrent request's `VerifyCode()` can overwrite the `token` field, causing `GetUser()` → `Userinfo()` to fetch the **wrong user's** identity claims. The same pattern exists in all three implementations: - [`github_oauth_service.go` lines 34–39, 77, 86–99](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/github_oauth_service.go#L34-L39) - [`google_oauth_service.go` lines 22–27, 65, 73–87](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/google_oauth_service.go#L22-L27) ### PoC **Race scenario** (two concurrent OAuth callbacks): 1. User A and User B both click "Login with GitHub" on the same tinyauth instance 2. Both are redirected to GitHub, authorize, and GitHub redirects both back with authorization codes 3. Both callbacks arrive at tinyauth nearly simultaneously: ``` Timeline: t0: Request A → service.VerifyCode(codeA) → singleton.token = tokenA t1: Request B → service.VerifyCode(codeB) → singleton.token = tokenB (overwrites tokenA) t2: Request A → broker.GetUser("github") → Userinfo() reads singleton.token = tokenB t3: Request A receives User B's identity (email, name, groups) ``` User A now has a tinyauth session with User B's email, gaining access to all resources User B is authorized for via tinyauth's ACL. **PKCE verifier DoS variant**: Even with PKCE, concurrent `oauthURLHandler` calls overwrite the `verifier` field, causing `VerifyCode()` to send the wrong verifier to the OAuth provider, which rejects the exchange. **Static verification**: Run Go's race detector on a test that calls `VerifyCode` and `Userinfo` concurrently on the same service instance — the `-race` flag will flag data races on the `token` and `verifier` fields. **Go race detector confirmation**: Running a concurrent test with `go test -race` on the singleton service detects **4 data races** on the `token` and `verifier` fields. Without the race detector, measured token overwrite rate is 99.9% (9,985/10,000 iterations). **Test environment**: tinyauth v5.0.4, commit `592b7ded`, Go race detector + source code analysis ### Impact An attacker who times their OAuth callback to race with a victim's callback can obtain a tinyauth session with the victim's identity. This grants unauthorized access to all resources the victim is permitted to access through tinyauth's ACL system. The probability of collision increases with concurrent OAuth traffic. The PKCE verifier overwrite additionally causes a denial-of-service: concurrent OAuth logins for the same provider reliably fail. ### Suggested Fix Pass verifier and token through method parameters or return values instead of storing them on the singleton: ```go func (generic *GenericOAuthService) VerifyCode(code string, verifier string) (*oauth2.Token, error) { return generic.config.Exchange(generic.context, code, oauth2.VerifierOption(verifier)) } func (generic *GenericOAuthService) Userinfo(token *oauth2.Token) (config.Claims, error) { client := generic.config.Client(generic.context, token) // ... } ``` Store the PKCE verifier in the session/cookie associated with the OAuth `state` parameter, not on the service struct.

CVE-2026-33544 Affected Github.com/steveiliop56/tinyauth Versions

1 component(s)
Fixed Versions:
1.0.1-0.20260401140714-fc1d4f2082a5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/steveiliop56/tinyauth
Go
< 1.0.1-0.20260401140714-fc1d4f2082a5
1.0.1-0.20260401140714-fc1d4f2082a5

References

Frequently Asked Questions

What is CVE-2026-33544?
CVE-2026-33544 is a security vulnerability in Github.com/steveiliop56/tinyauth involving Tinyauth has OAuth account confusion via shared mutable state on singleton service instances under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition').
Which Github.com/steveiliop56/tinyauth versions are affected?
Affected versions include releases prior to 1.0.1-0.20260401140714-fc1d4f2082a5 across affected packages: github.com/steveiliop56/tinyauth.
What version fixes CVE-2026-33544?
Upgrading to 1.0.1-0.20260401140714-fc1d4f2082a5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/steveiliop56/tinyauth affected?
Yes, github.com/steveiliop56/tinyauth is affected in releases prior to 1.0.1-0.20260401140714-fc1d4f2082a5. Upgrade your dependency to 1.0.1-0.20260401140714-fc1d4f2082a5 or later.
What is the CVSS score of CVE-2026-33544?
CVE-2026-33544 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-33544?
CVE-2026-33544 is classified under CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') (The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.).
How can I check Go dependencies for CVE-2026-33544?
Run the dependency tree command: 'inspect dependencies for github.com/steveiliop56/tinyauth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9q5m-jfc4-wc92",
  "modified" : "2026-04-06T17:18:24Z",
  "published" : "2026-04-01T19:52:04Z",
  "aliases" : [ "CVE-2026-33544" ],
  "summary" : "Tinyauth has OAuth account confusion via shared mutable state on singleton service instances",
  "details" : "### Summary\n\nAll three OAuth service implementations (`GenericOAuthService`, `GithubOAuthService`, `GoogleOAuthService`) store PKCE verifiers and access tokens as mutable struct fields on singleton instances shared across all concurrent requests. When two users initiate OAuth login for the same provider concurrently, a race condition between `VerifyCode()` and `Userinfo()` causes one user to receive a session with the other user's identity.\n\n### Details\n\nThe [`OAuthBrokerService.GetService()`](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/oauth_broker_service.go#L70-L72) returns a single shared instance per provider for every request. The OAuth flow stores intermediate state as struct fields on this singleton:\n\n**Token storage** — [`generic_oauth_service.go` line 96](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/generic_oauth_service.go#L96):\n```go\ngeneric.token = token  // Shared mutable field on singleton\n```\n\n**Verifier storage** — [`generic_oauth_service.go` line 81](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/generic_oauth_service.go#L81):\n```go\ngeneric.verifier = verifier  // Shared mutable field on singleton\n```\n\nIn the callback handler [`oauth_controller.go` lines 136–143](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/controller/oauth_controller.go#L136-L143), the code calls:\n```go\nerr = service.VerifyCode(code)                       // line 136 — stores token on singleton\n// ... race window ...\nuser, err := controller.broker.GetUser(req.Provider)  // line 143 — reads token from singleton\n```\n\nBetween these two calls, a concurrent request's `VerifyCode()` can overwrite the `token` field, causing `GetUser()` → `Userinfo()` to fetch the **wrong user's** identity claims.\n\nThe same pattern exists in all three implementations:\n- [`github_oauth_service.go` lines 34–39, 77, 86–99](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/github_oauth_service.go#L34-L39)\n- [`google_oauth_service.go` lines 22–27, 65, 73–87](https://github.com/steveiliop56/tinyauth/blob/592b7ded24959013f8af63ab9930254c752c8c8e/internal/service/google_oauth_service.go#L22-L27)\n\n### PoC\n\n**Race scenario** (two concurrent OAuth callbacks):\n\n1. User A and User B both click \"Login with GitHub\" on the same tinyauth instance\n2. Both are redirected to GitHub, authorize, and GitHub redirects both back with authorization codes\n3. Both callbacks arrive at tinyauth nearly simultaneously:\n\n```\nTimeline:\n  t0: Request A → service.VerifyCode(codeA) → singleton.token = tokenA\n  t1: Request B → service.VerifyCode(codeB) → singleton.token = tokenB  (overwrites tokenA)\n  t2: Request A → broker.GetUser(\"github\")  → Userinfo() reads singleton.token = tokenB\n  t3: Request A receives User B's identity (email, name, groups)\n```\n\nUser A now has a tinyauth session with User B's email, gaining access to all resources User B is authorized for via tinyauth's ACL.\n\n**PKCE verifier DoS variant**: Even with PKCE, concurrent `oauthURLHandler` calls overwrite the `verifier` field, causing `VerifyCode()` to send the wrong verifier to the OAuth provider, which rejects the exchange.\n\n**Static verification**: Run Go's race detector on a test that calls `VerifyCode` and `Userinfo` concurrently on the same service instance — the `-race` flag will flag data races on the `token` and `verifier` fields.\n\n**Go race detector confirmation**: Running a concurrent test with `go test -race` on the singleton service detects **4 data races** on the `token` and `verifier` fields. Without the race detector, measured token overwrite rate is 99.9% (9,985/10,000 iterations).\n\n**Test environment**: tinyauth v5.0.4, commit `592b7ded`, Go race detector + source code analysis\n\n### Impact\n\nAn attacker who times their OAuth callback to race with a victim's callback can obtain a tinyauth session with the victim's identity. This grants unauthorized access to all resources the victim is permitted to access through tinyauth's ACL system. The probability of collision increases with concurrent OAuth traffic.\n\nThe PKCE verifier overwrite additionally causes a denial-of-service: concurrent OAuth logins for the same provider reliably fail.\n\n### Suggested Fix\n\nPass verifier and token through method parameters or return values instead of storing them on the singleton:\n\n```go\nfunc (generic *GenericOAuthService) VerifyCode(code string, verifier string) (*oauth2.Token, error) {\n    return generic.config.Exchange(generic.context, code, oauth2.VerifierOption(verifier))\n}\n\nfunc (generic *GenericOAuthService) Userinfo(token *oauth2.Token) (config.Claims, error) {\n    client := generic.config.Client(generic.context, token)\n    // ...\n}\n```\n\nStore the PKCE verifier in the session/cookie associated with the OAuth `state` parameter, not on the service struct.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/steveiliop56/tinyauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1-0.20260401140714-fc1d4f2082a5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/security/advisories/GHSA-9q5m-jfc4-wc92"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33544"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/commit/f26c2171610d5c2dfbba2edb6ccd39490e349803"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/steveiliop56/tinyauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/releases/tag/v5.0.5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-362" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T19:52:04Z",
    "nvd_published_at" : "2026-04-02T15:16:39Z"
  }
}