CVE-2026-57177
LoginRadius backend lacks OAuth state validation, enabling login CSRF attacks.
- CVSS 4.3
- CWE-352
- Authentication, Authorization, and Session Management
- Remote
Python Social Auth is a social authentication/registration mechanism. Prior to version 5.0.0, the LoginRadius backend did not validate OAuth state during the authentication flow. Applications using this backend were vulnerable to login CSRF. An attacker could cause a victim's browser session to complete authentication using an attacker-controlled LoginRadius token, making the victim authenticated as the attacker's LoginRadius identity. The issue affects only applications using the LoginRadius backend. The issue has been fixe in version 5.0.0 by enabling callback state validation for the LoginRadius backend.
- CWE
- CWE-352
- CVSS base score
- 4.3
- Published
- 2026-09-24
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- Python Social Auth
- Fixed by upgrading
- Yes
Solution
Upgrade python‑social‑auth to version 5.0.0 or newer.
Vulnerable code sample
from social_django.utils import load_strategy, load_backend
from django.http import HttpResponseRedirect, HttpResponseBadRequest
def loginradius_auth(request):
# Initiate the OAuth flow with LoginRadius
strategy = load_strategy(request)
backend = load_backend(strategy=strategy, name='loginradius', redirect_uri=None)
# VULNERABLE: state parameter is not validated on callback, enabling login CSRF
return HttpResponseRedirect(backend.start())
def loginradius_callback(request):
# Process the OAuth callback without verifying state
strategy = load_strategy(request)
backend = load_backend(strategy=strategy, name='loginradius', redirect_uri=None)
try:
user = backend.complete() # Missing state validation
# ... proceed with logged‑in user
return HttpResponseRedirect('/')
except Exception:
return HttpResponseBadRequest('Authentication failed')Patched code sample
from social_django.utils import load_strategy, load_backend
from django.http import HttpResponseRedirect, HttpResponseBadRequest
def loginradius_auth(request):
# Initiate the OAuth flow with LoginRadius
strategy = load_strategy(request)
backend = load_backend(strategy=strategy, name='loginradius', redirect_uri=None)
return HttpResponseRedirect(backend.start())
def loginradius_callback(request):
# FIX: enforce OAuth state validation to prevent login CSRF
strategy = load_strategy(request)
backend = load_backend(strategy=strategy, name='loginradius', redirect_uri=None)
try:
# Validate the state token returned by the provider
strategy.validate_state()
user = backend.complete()
# ... proceed with logged‑in user
return HttpResponseRedirect('/')
except Exception:
return HttpResponseBadRequest('Authentication failed')Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix(backends): LoginRadius backend now validates callback state (python-social-auth/social-core)
social_core/backends/loginradius.py,social_core/backends/loginradius.py · LoginRadiusAuth.auth_html
Cite this entry
@misc{vaitp:cve202657177,
title = {{LoginRadius backend lacks OAuth state validation, enabling login CSRF attacks.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-57177},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-57177/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
