Cross-site Request Forgery (CSRF) Affecting fastapi-users package, versions [,15.0.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.03% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-FASTAPIUSERS-14545439
  • published21 Dec 2025
  • disclosed19 Dec 2025
  • creditdavidbors-snyk

Introduced: 19 Dec 2025

CVE-2025-68481  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade fastapi-users to version 15.0.2 or higher.

Overview

fastapi-users is a Ready-to-use and customizable users management for FastAPI

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) via the generate_state_token function, which is called with an empty state_data dict, so the resulting JWT contains only the fixed audience claim and an expiration timestamp. An attacker can gain unauthorized access to user accounts or cause a user to be logged into the attacker's account by capturing a server-generated state token during the OAuth flow and tricking a victim into completing the authentication callback with attacker-controlled parameters.

CVSS Base Scores

version 4.0
version 3.1