FastAPI Users Vulnerable to 1-click Account Takeover in Apps Using FastAPI SSO
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Security bypass, Tampering
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-285 and CWE-352.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastapi-users | fastapi-users | before 15.0.2 | 15.0.2 | Patch available | CNA |
| — | fastapi-users (PyPI) | before 15.0.2 | 15.0.2 | Patch available | GHSA-5j53-63w8-8625 |
- fastapi-users Vendorfastapi-users Affected before 15.0.2 Fixed in 15.0.2 Patch available CNA
- fastapi-users (PyPI) Vendor— Affected before 15.0.2 Fixed in 15.0.2 Patch available GHSA-5j53-63w8-8625
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:fastapi-users_project:fastapi_users:*:*:*:*:*:python:*:* | before 15.0.2 | Vulnerable | Fastapi-users Project |
- cpe:2.3:a:fastapi-users_project:fastapi_users:*:*:*:*:*:python:*:* Versions before 15.0.2 Vulnerable ·Fastapi-users Project
Remediation
- Fix · CNA fastapi-users (fastapi-users) Fixed in 15.0.2
- Fix · GHSA-5j53-63w8-8625 fastapi-users (PyPI) Fixed in 15.0.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-68481
- 2026-10-03 Alias added: GHSA-5j53-63w8-8625
References
Patch 1
Other 3
Sources
- CVE-2025-68481 · CVE Program
- CVE-2025-68481 · NVD
- FIRST EPSS
- GHSA-5j53-63w8-8625 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences