CVE-2026-32246: Github.com/steveiliop56/tinyauth Tinyauth Vulnerable To TOTP/2FA Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-3q28-qjrv-qr39
CVSS 8.5
CWE-287
Published
Advisory Summary

CVE-2026-32246 is a HIGH (CVSS 8.5) tinyauth vulnerable to totp/2fa bypass vulnerability (CWE-287: Improper Authentication) affecting Github.com/steveiliop56/tinyauth libraries in the Go ecosystem. The issue involves tinyauth vulnerable to totp/2fa bypass via oidc authorize endpoint. Remediation is available by upgrading affected packages to version 1.0.1-20260311144920-9eb2d33064b7.

CVE-2026-32246 at a Glance

CVE Identifier CVE-2026-32246
GHSA Identifier GHSA-3q28-qjrv-qr39
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/steveiliop56/tinyauth
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.5

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

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

How to Fix CVE-2026-32246

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-32246, 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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 authorization endpoint allows users with a TOTP-pending session (password verified, TOTP not yet completed) to obtain authorization codes. An attacker who knows a user's password but not their TOTP secret can obtain valid OIDC tokens, completely bypassing the second factor. ### Details When a user with TOTP enabled logs in at `POST /api/user/login`, the server creates a session with `TotpPending: true` and returns a session cookie. The context middleware (`internal/middleware/context_middleware.go:56-66`) correctly sets `TotpPending: true` and does not set `IsLoggedIn` for these sessions. However, the OIDC authorize handler (`internal/controller/oidc_controller.go:105-116`) only checks whether a user context exists via `utils.GetContext(c)`. It does not check `IsLoggedIn` or `TotpPending`. Since the context middleware populates a context for TOTP-pending sessions (with the username filled in), `GetContext` succeeds, and the handler proceeds to issue an authorization code at line 156 using the username from the incomplete session. For comparison, the proxy controller (`internal/controller/proxy_controller.go:176-179`) correctly blocks TOTP-incomplete sessions by checking `IsBasicAuth && TotpEnabled` and setting `IsLoggedIn = false`. The OIDC authorize handler has no equivalent guard. `StoreCode` at `internal/service/oidc_service.go:305` saves the code with the victim's `sub` claim. The attacker then exchanges this code at `POST /api/oidc/token` for a valid access token and ID token. ### PoC Prerequisites: a tinyauth instance with at least one OIDC client configured and a local user with TOTP enabled. Step 1 — Log in with password only (do not complete TOTP): ``` curl -c cookies.txt -X POST http://localhost:3000/api/user/login \ -H "Content-Type: application/json" \ -d '{"username":"totpuser","password":"totp123"}' ``` Response: `{"message":"TOTP required","status":200,"totpPending":true}` Step 2 — Request an OIDC authorization code using the TOTP-pending cookie: ``` curl -b cookies.txt -X POST http://localhost:3000/api/oidc/authorize \ -H "Content-Type: application/json" \ -d '{"client_id":"my-client-id","redirect_uri":"http://localhost:8080/callback","response_type":"code","scope":"openid","state":"test"}' ``` Response: `{"redirect_uri":"http://localhost:8080/callback?code=<AUTH_CODE>&state=test","status":200}` Step 3 — Exchange the code for tokens: ``` curl -X POST http://localhost:3000/api/oidc/token \ -u "my-client-id:my-client-secret" \ -d "grant_type=authorization_code&code=<AUTH_CODE>&redirect_uri=http://localhost:8080/callback" ``` Response contains `access_token`, `id_token`, and `refresh_token` for the victim user. TOTP was never submitted. ### Impact Complete bypass of TOTP/MFA for any user account on any tinyauth instance that has OIDC clients configured. An attacker who has compromised a user's password (credential stuffing, phishing, database breach) can obtain SSO tokens for that user's identity without knowing the TOTP secret. This defeats the purpose of the second factor entirely. All downstream applications relying on tinyauth's OIDC provider for authentication are affected.

CVE-2026-32246 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-32246?
CVE-2026-32246 is a security vulnerability in Github.com/steveiliop56/tinyauth involving Tinyauth vulnerable to TOTP/2FA bypass via OIDC authorize endpoint under CWE-287: Improper Authentication.
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-32246?
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-32246?
CVE-2026-32246 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N.
What CWE is associated with CVE-2026-32246?
CVE-2026-32246 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2026-32246?
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-3q28-qjrv-qr39",
  "modified" : "2026-03-13T13:35:22Z",
  "published" : "2026-03-12T16:38:46Z",
  "aliases" : [ "CVE-2026-32246" ],
  "summary" : "Tinyauth vulnerable to TOTP/2FA bypass via OIDC authorize endpoint",
  "details" : "### Summary\n\nThe OIDC authorization endpoint allows users with a TOTP-pending session (password verified, TOTP not yet completed) to obtain authorization codes. An attacker who knows a user's password but not their TOTP secret can obtain valid OIDC tokens, completely bypassing the second factor.\n\n### Details\n\nWhen a user with TOTP enabled logs in at `POST /api/user/login`, the server creates a session with `TotpPending: true` and returns a session cookie. The context middleware (`internal/middleware/context_middleware.go:56-66`) correctly sets `TotpPending: true` and does not set `IsLoggedIn` for these sessions.\n\nHowever, the OIDC authorize handler (`internal/controller/oidc_controller.go:105-116`) only checks whether a user context exists via `utils.GetContext(c)`. It does not check `IsLoggedIn` or `TotpPending`. Since the context middleware populates a context for TOTP-pending sessions (with the username filled in), `GetContext` succeeds, and the handler proceeds to issue an authorization code at line 156 using the username from the incomplete session.\n\nFor comparison, the proxy controller (`internal/controller/proxy_controller.go:176-179`) correctly blocks TOTP-incomplete sessions by checking `IsBasicAuth && TotpEnabled` and setting `IsLoggedIn = false`. The OIDC authorize handler has no equivalent guard.\n\n`StoreCode` at `internal/service/oidc_service.go:305` saves the code with the victim's `sub` claim. The attacker then exchanges this code at `POST /api/oidc/token` for a valid access token and ID token.\n\n### PoC\n\nPrerequisites: a tinyauth instance with at least one OIDC client configured and a local user with TOTP enabled.\n\nStep 1 — Log in with password only (do not complete TOTP):\n\n```\ncurl -c cookies.txt -X POST http://localhost:3000/api/user/login \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"totpuser\",\"password\":\"totp123\"}'\n```\n\nResponse: `{\"message\":\"TOTP required\",\"status\":200,\"totpPending\":true}`\n\nStep 2 — Request an OIDC authorization code using the TOTP-pending cookie:\n\n```\ncurl -b cookies.txt -X POST http://localhost:3000/api/oidc/authorize \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\":\"my-client-id\",\"redirect_uri\":\"http://localhost:8080/callback\",\"response_type\":\"code\",\"scope\":\"openid\",\"state\":\"test\"}'\n```\n\nResponse: `{\"redirect_uri\":\"http://localhost:8080/callback?code=<AUTH_CODE>&state=test\",\"status\":200}`\n\nStep 3 — Exchange the code for tokens:\n\n```\ncurl -X POST http://localhost:3000/api/oidc/token \\\n  -u \"my-client-id:my-client-secret\" \\\n  -d \"grant_type=authorization_code&code=<AUTH_CODE>&redirect_uri=http://localhost:8080/callback\"\n```\n\nResponse contains `access_token`, `id_token`, and `refresh_token` for the victim user. TOTP was never submitted.\n\n### Impact\n\nComplete bypass of TOTP/MFA for any user account on any tinyauth instance that has OIDC clients configured. An attacker who has compromised a user's password (credential stuffing, phishing, database breach) can obtain SSO tokens for that user's identity without knowing the TOTP secret. This defeats the purpose of the second factor entirely. All downstream applications relying on tinyauth's OIDC provider for authentication are affected.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/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-3q28-qjrv-qr39"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32246"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/steveiliop56/tinyauth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/steveiliop56/tinyauth/releases/tag/v5.0.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T16:38:46Z",
    "nvd_published_at" : "2026-03-12T19:16:19Z"
  }
}