CVE-2026-57179
Partial token can be reused across browsers, letting attackers hijack user sessions.
- CVSS 4.2
- CWE-384
- Authentication, Authorization, and Session Management
- Remote
Python Social Auth is a social authentication/registration mechanism. Prior to version 5.0.0, the partial-pipeline resume mechanism accepted `partial_token` as a bearer credential without binding it to the browser session that created it. Applications using resumable partial pipeline steps could allow an attacker to start an authentication flow, obtain a valid partial token and verification data, and cause a victim's browser to resume that attacker-controlled flow. This could authenticate the victim's browser as the attacker's account. The issue affects applications using partial pipeline steps such as `mail_validation` or custom steps decorated with `@partial`. The issue has been fixed in version 5.0.0 by binding partial pipeline resumes to the originating browser session.
- CWE
- CWE-384
- CVSS base score
- 4.2
- Published
- 2026-09-24
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Session Management Issues
- 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_core.backends.google import GoogleOAuth2
from social_core.pipeline.partial import partial
def start_auth(request):
"""Start OAuth flow and store partial token."""
backend = GoogleOAuth2()
# VULNERABLE: accepts partial_token without binding to session
return backend.auth_url() # returns redirect with ?partial_token=...
def resume_partial(request):
"""Resume a partial pipeline step using the token from the query string."""
token = request.GET.get('partial_token')
if not token:
raise ValueError("Missing token")
# The original library would retrieve the partial pipeline data solely by token
partial_data = request.session.get('partial_pipeline_data', {})
if token not in partial_data:
raise ValueError("Invalid token")
# Continue processing using attacker‑controlled token
request.session['partial_pipeline_data'] = partial_data[token]
# ... continue pipeline ...
return "Resumed"Patched code sample
from social_core.backends.google import GoogleOAuth2
from social_core.pipeline.partial import partial
def start_auth(request):
"""Start OAuth flow and store partial token bound to session."""
backend = GoogleOAuth2()
return backend.auth_url()
def resume_partial(request):
"""Resume a partial pipeline step only if token matches session binding."""
token = request.GET.get('partial_token')
if not token:
raise ValueError("Missing token")
# FIX: bind token to the originating browser session
bound_token = request.session.get('partial_token')
if bound_token != token:
raise ValueError("Token does not match session")
partial_data = request.session.get('partial_pipeline_data', {})
if token not in partial_data:
raise ValueError("Invalid token")
request.session['partial_pipeline_data'] = partial_data[token]
return "Resumed"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!: bind partial pipeline resumes to sessions (python-social-auth/social-core)
social_core/actions.py,social_core/actions.py · do_complete,social_core/actions.py · do_disconnect,social_core/pipeline/mail.py,social_core/pipeline/mail.py · mail_validation,social_core/pipeline/partial.py,social_core/pipeline/partial.py · partial_step,social_core/strategy.py,social_core/strategy.py · BaseStrategy.clean_partial_pipeline,social_core/utils.py,social_core/utils.py · partial_pipeline_data
Cite this entry
@misc{vaitp:cve202657179,
title = {{Partial token can be reused across browsers, letting attackers hijack user sessions.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-57179},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-57179/}}
}
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 ::
