Skip to content
Medium 5.9

Vulnerability in fastapi-users

CVE-2025-68481 First seen on SecPulse

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2025-68481 has been found in fastapi-users.
Attackers can target a specific entry point like state_data over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 5.9/10.
What to do: upgrade fastapi-users to 15.0.2 or later.
If unsure, ask your IT team or search "fastapi-users CVE-2025-68481" on the vendor's site.

CVE-2025-68481 (fastapi-users) — CWE-285 / CVSS v3 5.9
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: state_data / state_secret / UserManager / BaseUserManager.
Patched: 15.0.2 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

What is the problem

A vulnerability (CWE-285) exists in fastapi-users. Attackers reach the vulnerable code path via state_data without authentication.

Affected scope

Check the vendor advisory for the affected versions of fastapi-users. Attack surface: state_data / state_secret / UserManager / BaseUserManager..

Severity

Severity: Medium (CVSS 5.9/10). Confidential information can be exposed externally.

How to fix

Update to 15.0.2.

Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'fastapi-users' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposureidentify
    grep -r 'fastapi-users' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で fastapi-users を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patchpatch
    Upgrade fastapi-users to 15.0.2

    ステージング環境で 15.0.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
PyPIfastapi-users
< 15.0.2→ 15.0.2
Original description The description as published by the source.

FastAPI Users allows users to quickly add a registration and authentication system to their FastAPI project. Prior to version 15.0.2, the OAuth login state tokens are completely stateless and carry no per-request entropy or any data that could link them to the session that initiated the OAuth flow. generate_state_token() is always called with an empty state_data dict, so the resulting JWT only contains the fixed audience claim plus an expiration timestamp. On callback, the library merely checks that the JWT verifies under state_secret and is unexpired; there is no attempt to match the state value to the browser that initiated the OAuth request, no correlation cookie, and no server-side cache. Any attacker can hit /authorize, capture the server-generated state, finish the upstream OAuth flow with their own provider account, and then trick a victim into loading .../callback?code=&state=. Because the state JWT is valid for any client for ~1 hour, the victim’s browser will complete the flow. This leads to login CSRF. Depending on the app’s logic, the login CSRF can lead to an account takeover of the victim account or to the victim user getting logged in to the attacker's account. Version 15.0.2 contains a patch for the issue.

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details