{"cve":"CVE-2025-68481","nvd":{"published":"2025-12-19T21:15:54.823","modified":"2026-10-13T11:10:00.203","status":"Analyzed","description":"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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-285","CWE-352"],"references":["https://github.com/fastapi-users/fastapi-users/blob/bcee8c9b884de31decb5d799aead3974a0b5b158/fastapi_users/router/oauth.py#L111","https://github.com/fastapi-users/fastapi-users/blob/bcee8c9b884de31decb5d799aead3974a0b5b158/fastapi_users/router/oauth.py#L57","https://github.com/fastapi-users/fastapi-users/commit/7cf413cd766b9cb0ab323ce424ddab2c0d235932","https://github.com/fastapi-users/fastapi-users/security/advisories/GHSA-5j53-63w8-8625"],"products":["fastapi-users_project:fastapi_users"],"source":"nvd","synced_at":"2026-10-19T22:17:07.138532058+00:00"},"epss":{"cve":"CVE-2025-68481","score":0.00258,"percentile":0.17351,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-5j53-63w8-8625","url":"https://osv.dev/vulnerability/GHSA-5j53-63w8-8625","summary":"FastAPI Users Vulnerable to 1-click Account Takeover in Apps Using FastAPI SSO","modified":"2026-07-07T17:56:06.133575316Z","packages":[{"ecosystem":"PyPI","name":"fastapi-users","purl":"pkg:pypi/fastapi-users","ranges":["<15.0.2"],"fixed":["15.0.2"]}]},{"id":"PYSEC-2026-1363","url":"https://osv.dev/vulnerability/PYSEC-2026-1363","summary":"FastAPI Users Vulnerable to 1-click Account Takeover in Apps Using FastAPI SSO","modified":"2026-07-07T17:47:13.101051852Z","packages":[{"ecosystem":"PyPI","name":"fastapi-users","purl":"pkg:pypi/fastapi-users","ranges":["<15.0.2"],"fixed":["15.0.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}