Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-14546: Cross-site Request Forgery (CSRF) in fastapi-sso

0
Medium
VulnerabilityCVE-2025-14546cvecve-2025-14546
Published: Fri Dec 19 2025 (12/19/2025, 05:00:02 UTC)
Source: CVE Database V5
Product: fastapi-sso

Description

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. While the get_login_url method allows for state generation, it does not persist the state or bind it to the user's session. Consequently, the verify_and_process method accepts the state received in the query parameters without verifying it against a trusted local value. This allows a remote attacker to trick a victim into visiting a malicious callback URL, which can result in the attacker's account being linked to the victim's internal account.

AI-Powered Analysis

AILast updated: 12/26/2025, 05:39:18 UTC

Technical Analysis

The vulnerability identified as CVE-2025-14546 affects the fastapi-sso package, specifically versions prior to 0.19.0. Fastapi-sso is a Python package used to implement Single Sign-On (SSO) via OAuth in FastAPI applications. The core issue lies in the improper handling of the OAuth state parameter during the authentication callback phase. Normally, the state parameter is used to prevent CSRF attacks by binding the authentication request to the user's session, ensuring that the response corresponds to the original request. However, in vulnerable versions, while the get_login_url method generates a state parameter, it neither persists this state nor associates it with the user's session. Consequently, the verify_and_process method accepts the state parameter from the callback URL query parameters without verifying it against a trusted, locally stored value. This flaw allows an attacker to craft a malicious callback URL containing their own state and trick a victim into visiting it. When the victim does so, the victim's internal account becomes linked to the attacker's account, potentially enabling session confusion, unauthorized access, or privilege escalation scenarios. The CVSS 4.0 vector indicates network attack vector, low attack complexity, no privileges required, but user interaction is necessary. The vulnerability impacts confidentiality and integrity by enabling unauthorized account linkage but does not directly affect availability. No patches or exploits are currently documented, but the risk remains significant for affected deployments.

Potential Impact

For European organizations, the impact of CVE-2025-14546 can be substantial, especially for those relying on fastapi-sso for OAuth-based authentication in internal or customer-facing applications. Successful exploitation could allow attackers to link their accounts to victim accounts, leading to unauthorized access to sensitive data or services. This could result in data breaches, compliance violations (e.g., GDPR), and reputational damage. The attack could also facilitate further lateral movement within networks if internal accounts are compromised. Since OAuth is widely used for authentication, organizations using fastapi-sso in sectors such as finance, healthcare, and government are at heightened risk. The medium severity rating suggests the threat is serious but requires user interaction, which may limit large-scale automated exploitation. However, targeted phishing or social engineering campaigns could increase risk. The absence of known exploits in the wild provides a window for proactive mitigation before active attacks emerge.

Mitigation Recommendations

European organizations should immediately upgrade fastapi-sso to version 0.19.0 or later, where this vulnerability is fixed by properly persisting and validating the OAuth state parameter against the user's session. If upgrading is not immediately feasible, organizations should implement additional CSRF protections around the OAuth callback endpoint, such as verifying the state parameter against a server-side stored value or employing anti-CSRF tokens at the application level. Monitoring and logging OAuth authentication flows for anomalies in state parameters can help detect exploitation attempts. User education to recognize phishing attempts that might lead to malicious callback URLs is also recommended. Additionally, organizations should review their OAuth implementation to ensure adherence to best practices for state parameter handling and session management. Conducting penetration testing focused on OAuth flows can help identify residual weaknesses. Finally, maintain awareness of any emerging exploits or patches related to this CVE.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
snyk
Date Reserved
2025-12-11T17:14:20.112Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6944df6e19341fe18884f730

Added to database: 12/19/2025, 5:15:26 AM

Last enriched: 12/26/2025, 5:39:18 AM

Last updated: 2/7/2026, 1:54:40 PM

Views: 347

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats