CVE-2025-14546: FastAPI SSP Vulnerable to CSRF via Improper OAuth Parameter Validation

fastapi-sso Updated 19 Dec 2025

Summary

19/12/2025
Yes i
Moderate
6.3

CVE-2025-14546: Versions of the package fastapi-sso before 0.19.0 are vulnerable to Cross-site Request Forgery (CSRF) due to the improper validation of the OAuth state parameter during the authentication callback. Affects fastapi-sso versions < 0.19.0. Fixed in 0.19.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

FastAPI SSP is a Python package designed to facilitate Single Sign-On (SSO) authentication for FastAPI applications. It simplifies the integration of OAuth providers, allowing developers to implement secure authentication flows. However, prior to version 0.19.0, the package exhibited a critical vulnerability related to Cross-site Request Forgery (CSRF), stemming from inadequate validation of the OAuth state parameter during authentication callbacks.

Vulnerability Detail

The vulnerability arises from the failure to properly validate the OAuth state parameter in the authentication callback process. Although the get_login_url method generates a state, it does not persist this state or associate it with the user's session. As a result, the verify_and_process method accepts the state from query parameters without verifying it against a trusted local value. This oversight allows attackers to exploit the vulnerability by tricking victims into visiting malicious callback URLs, potentially linking the attacker's account to the victim's internal account.

How To Fix

Latest published version: 0.23.0 as of 23 Oct 2026

pip install --upgrade "fastapi-sso==0.23.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.19.0

This is the first release that contains the fix.

pip install --upgrade "fastapi-sso==0.19.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, ensure that your application implements additional checks on the OAuth state parameter before processing it. This can involve manually validating the state against a known value stored in the user's session or database.

Conclusion

The vulnerability identified as CVE-2025-14546 in the fastapi-sso package poses a significant risk due to improper validation of the OAuth state parameter, leading to potential CSRF attacks. It is crucial for developers to update to version 0.19.0 or later to mitigate this risk and ensure the security of their applications.

See every vulnerability recorded for fastapi-sso →

Share this vulnerability

FAQ

CSRF is a type of attack that tricks a user into executing unwanted actions on a web application in which they are authenticated.

If you are using fastapi-sso version prior to 0.19.0, your application is vulnerable. You can check your application's dependencies using tools like Vulert.

An attacker could link their account to a victim's internal account, gaining unauthorized access to sensitive information or functionalities.

Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software without requiring access to the code.

The CVSS score for this vulnerability is 6.3, indicating a moderate level of risk.

How To Fix

Latest published version: 0.23.0 as of 23 Oct 2026

pip install --upgrade "fastapi-sso==0.23.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.19.0

This is the first release that contains the fix.

pip install --upgrade "fastapi-sso==0.19.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback