CVE-2026-32245: Github.com/steveiliop56/tinyauth Tinyauth's OIDC Authorization Codes Are Vulnerability

MODERATE
Advisory Identifier: GHSA-xg2q-62g2-cvcm
CVSS 6.5
CWE-863
Published
Advisory Summary

CVE-2026-32245 is a MODERATE (CVSS 6.5) tinyauth's oidc authorization codes are vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/steveiliop56/tinyauth libraries in the Go ecosystem. The issue involves tinyauth's oidc authorization codes are not bound to client on token exchange. Remediation is available by upgrading affected packages to version 1.0.1-20260311144920-9eb2d33064b7.

CVE-2026-32245 at a Glance

CVE Identifier CVE-2026-32245
GHSA Identifier GHSA-xg2q-62g2-cvcm
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/steveiliop56/tinyauth
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:L/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 Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-32245

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-20260311144920-9eb2d33064b7
Upgrade github.com/steveiliop56/tinyauth to 1.0.1-20260311144920-9eb2d33064b7
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-32245, 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-20260311144920-9eb2d33064b7), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. 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 The OIDC token endpoint does not verify that the client exchanging an authorization code is the same client the code was issued to. A malicious OIDC client operator can exchange another client's authorization code using their own client credentials, obtaining tokens for users who never authorized their application. This violates RFC 6749 Section 4.1.3. ### Details When an authorization code is created, `StoreCode` at `internal/service/oidc_service.go:305-322` correctly stores the `ClientID` alongside the code hash in the database (line 316). During token exchange at `internal/controller/oidc_controller.go:267-309`, the handler retrieves the code entry at line 268 and validates the `redirect_uri` at line 291, but never compares `entry.ClientID` against the requesting client's ID (`creds.ClientID`). The code proceeds directly to `GenerateAccessToken` at line 299. The developers clearly intended this check to exist, the refresh token flow at `internal/service/oidc_service.go:508-510` has the exact guard: `if entry.ClientID != reqClientId { return TokenResponse{}, ErrInvalidClient }`. It was simply omitted from the authorization code grant. The `entry.ClientID` field is stored in the database but never read during authorization code exchange. ### PoC Prerequisites: a tinyauth instance with two OIDC clients configured (Client A and Client B). Both clients must have at least one overlapping redirect URI, or the attacker must be able to intercept the authorization code from Client A's redirect (via referrer leak, browser history, log access, etc.). Step 1 — Log in as a normal user: ``` curl -c cookies.txt -X POST http://localhost:3000/api/user/login \ -H "Content-Type: application/json" \ -d '{"username":"admin","password":"admin123"}' ``` Step 2 — Authorize with Client A: ``` curl -b cookies.txt -X POST http://localhost:3000/api/oidc/authorize \ -H "Content-Type: application/json" \ -d '{"client_id":"client-a-id","redirect_uri":"http://localhost:8080/callback","response_type":"code","scope":"openid","state":"test"}' ``` Extract the `code` parameter from the `redirect_uri` in the response. Step 3 — Exchange Client A's code using Client B's credentials: ``` curl -X POST http://localhost:3000/api/oidc/token \ -u "client-b-id:client-b-secret" \ -d "grant_type=authorization_code&code=<CODE_FROM_STEP_2>&redirect_uri=http://localhost:8080/callback" ``` The server returns a valid `access_token`, `id_token`, and `refresh_token`. Client B has obtained tokens for a user who only authorized Client A. ### Impact A malicious OIDC relying party operator who can intercept or observe an authorization code issued to a different client can exchange it for tokens under their own client identity. This enables user impersonation across OIDC clients on the same tinyauth instance. The attack requires a multi-client deployment and a way to obtain the victim client's authorization code (which is passed as a URL query parameter and can leak through referrer headers, browser history, or server logs). Single-client deployments are not affected.

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

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

References

Frequently Asked Questions

What is CVE-2026-32245?
CVE-2026-32245 is a security vulnerability in Github.com/steveiliop56/tinyauth involving Tinyauth's OIDC authorization codes are not bound to client on token exchange under CWE-863: Incorrect Authorization.
Which Github.com/steveiliop56/tinyauth versions are affected?
Affected versions include releases prior to 1.0.1-20260311144920-9eb2d33064b7 across affected packages: github.com/steveiliop56/tinyauth.
What version fixes CVE-2026-32245?
Upgrading to 1.0.1-20260311144920-9eb2d33064b7 (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-20260311144920-9eb2d33064b7. Upgrade your dependency to 1.0.1-20260311144920-9eb2d33064b7 or later.
What is the CVSS score of CVE-2026-32245?
CVE-2026-32245 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:N.
What CWE is associated with CVE-2026-32245?
CVE-2026-32245 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2026-32245?
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-xg2q-62g2-cvcm",
  "modified" : "2026-03-24T21:11:30Z",
  "published" : "2026-03-12T16:38:42Z",
  "aliases" : [ "CVE-2026-32245" ],
  "summary" : "Tinyauth's OIDC authorization codes are not bound to client on token exchange",
  "details" : "### Summary\n\nThe OIDC token endpoint does not verify that the client exchanging an authorization code is the same client the code was issued to. A malicious OIDC client operator can exchange another client's authorization code using their own client credentials, obtaining tokens for users who never authorized their application. This violates RFC 6749 Section 4.1.3.\n\n### Details\n\nWhen an authorization code is created, `StoreCode` at `internal/service/oidc_service.go:305-322` correctly stores the `ClientID` alongside the code hash in the database (line 316).\n\nDuring token exchange at `internal/controller/oidc_controller.go:267-309`, the handler retrieves the code entry at line 268 and validates the `redirect_uri` at line 291, but never compares `entry.ClientID` against the requesting client's ID (`creds.ClientID`). The code proceeds directly to `GenerateAccessToken` at line 299.\n\nThe developers clearly intended this check to exist, the refresh token flow at `internal/service/oidc_service.go:508-510` has the exact guard: `if entry.ClientID != reqClientId { return TokenResponse{}, ErrInvalidClient }`. It was simply omitted from the authorization code grant.\n\nThe `entry.ClientID` field is stored in the database but never read during authorization code exchange.\n\n### PoC\n\nPrerequisites: a tinyauth instance with two OIDC clients configured (Client A and Client B). Both clients must have at least one overlapping redirect URI, or the attacker must be able to intercept the authorization code from Client A's redirect (via referrer leak, browser history, log access, etc.).\n\nStep 1 — Log in as a normal user:\n\n```\ncurl -c cookies.txt -X POST http://localhost:3000/api/user/login \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"admin\",\"password\":\"admin123\"}'\n```\n\nStep 2 — Authorize with Client A:\n\n```\ncurl -b cookies.txt -X POST http://localhost:3000/api/oidc/authorize \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\":\"client-a-id\",\"redirect_uri\":\"http://localhost:8080/callback\",\"response_type\":\"code\",\"scope\":\"openid\",\"state\":\"test\"}'\n```\n\nExtract the `code` parameter from the `redirect_uri` in the response.\n\nStep 3 — Exchange Client A's code using Client B's credentials:\n\n```\ncurl -X POST http://localhost:3000/api/oidc/token \\\n  -u \"client-b-id:client-b-secret\" \\\n  -d \"grant_type=authorization_code&code=<CODE_FROM_STEP_2>&redirect_uri=http://localhost:8080/callback\"\n```\n\nThe server returns a valid `access_token`, `id_token`, and `refresh_token`. Client B has obtained tokens for a user who only authorized Client A.\n\n### Impact\n\nA malicious OIDC relying party operator who can intercept or observe an authorization code issued to a different client can exchange it for tokens under their own client identity. This enables user impersonation across OIDC clients on the same tinyauth instance. The attack requires a multi-client deployment and a way to obtain the victim client's authorization code (which is passed as a URL query parameter and can leak through referrer headers, browser history, or server logs). Single-client deployments are not affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/steveiliop56/tinyauth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1-20260311144920-9eb2d33064b7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/security/advisories/GHSA-xg2q-62g2-cvcm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32245"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/commit/b2a1bfb1f532e87f205fa3afa3fc9f148c53ab89"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/steveiliop56/tinyauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/releases/tag/v5.0.3"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2026-4689"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T16:38:42Z",
    "nvd_published_at" : "2026-03-12T19:16:19Z"
  }
}