CVE-2025-68481

Source
https://cve.org/CVERecord?id=CVE-2025-68481
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68481.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-68481
Aliases
Published
2025-12-19T20:14:07.636Z
Modified
2026-01-29T02:51:56.182915Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N CVSS Calculator
Summary
FastAPI Users Vulnerable to 1-click Account Takeover in Apps Using FastAPI SSO
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-285",
        "CWE-352"
    ],
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68481.json"
}
References

Affected packages

Git / github.com/fastapi-users/fastapi-users

Affected ranges

Type
GIT
Repo
https://github.com/fastapi-users/fastapi-users
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*
v0.1.0
v0.2.0
v0.3.0
v0.3.1
v0.3.2
v0.4.0
v0.4.1
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.6.5
v0.6.6
v0.7.0
v0.7.1
v0.7.2
v0.7.3
v0.8.0
v0.8.1
v1.*
v1.0.0
v1.1.0
v1.1.1
v10.*
v10.0.0
v10.0.1
v10.0.2
v10.0.3
v10.0.4
v10.0.5
v10.0.6
v10.0.7
v10.1.0
v10.1.1
v10.1.2
v10.1.3
v10.1.4
v10.1.5
v10.2.0
v10.2.1
v10.3.0
v10.4.0
v10.4.1
v10.4.2
v11.*
v11.0.0
v12.*
v12.0.0
v12.1.0
v12.1.1
v12.1.2
v12.1.3
v13.*
v13.0.0
v14.*
v14.0.0
v14.0.1
v14.0.2
v15.*
v15.0.0
v15.0.1
v2.*
v2.0.0
v2.0.1
v3.*
v3.0.0
v3.0.1
v3.0.2
v3.0.3
v3.0.4
v3.0.5
v3.0.6
v3.0.7
v3.1.0
v3.1.1
v3.1.2
v4.*
v4.0.0
v5.*
v5.0.0
v5.1.0
v5.1.1
v5.1.2
v5.1.3
v5.1.4
v6.*
v6.0.0
v6.1.0
v6.1.1
v6.1.2
v6.1.3
v7.*
v7.0.0
v8.*
v8.0.0
v8.0.0b1
v8.0.0b2
v8.0.0b3
v8.1.0
v8.1.1
v8.1.2
v8.1.3
v8.1.4
v9.*
v9.0.0
v9.0.1
v9.1.0
v9.1.1
v9.2.0
v9.2.1
v9.2.2
v9.2.3
v9.2.4
v9.2.5
v9.2.6
v9.3.0
v9.3.1
v9.3.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68481.json"