fastapi-sso is vulnerable to Cross-Site Request Forgery (CSRF)
54
Medium Risk
The OAuth login flow in fastapi-sso ships state-based CSRF protection disabled by default because requires_state defaults to a value that skips validation. The callback handler accepts the state returned by the provider without requiring it to match a session-bound sso_state cookie, so a login CSRF attack can complete an OAuth login in a victim's browser for an account the attacker controls. This can lead to session fixation or binding the victim's session to an attacker-chosen identity. The fix enables state validation by default, binds the sso_state cookie with hardened attributes, and rejects callbacks whose state cookie is missing or does not match using a constant-time comparison.
You are affected if you are using a version that falls within the vulnerable range and your OAuth login flow relies on the default state handling without enabling requires_state validation, so callbacks are accepted with an externally supplied state that is never matched against a session-bound sso_state cookie.
fastapi-sso is vulnerable to Cross-Site Request Forgery (CSRF) in versions 0.0.1 - 0.21.1.
Upgrade the fastapi-sso library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.