Back to CVE records
Medium 5.9Published Dec 19, 2025

CVE-2025-68481FastAPI Users Vulnerable to 1-click Account Takeover in Apps Using FastAPI SSO

Updated under an hour ago ()

Does this affect you?

It affects fastapi-users and 1 other product. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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=<attacker_code>&state=<attacker_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.

CVSS
5.9 MEDIUM (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness (CWE)
CWE-285, CWE-352
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
GitHub_M
NVD analysis
Analyzed
Record last updated
Dec 19, 2025
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
fastapi-users fastapi-users
fastapi_users:fastapi_users (from the name)
before 15.0.2
CNA record
fastapi-users_project fastapi_users
fastapi-users_project:fastapi_users
before 15.0.2
NVD

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.