Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-62322 Overview
CVE-2026-62322 is a missing OAuth state validation flaw in the LINE backend of python-social-auth/social-core prior to version 5.0.2. The auth_complete method exchanges an authorization code without verifying the returned OAuth state parameter. An attacker can initiate authorization against an attacker-controlled LINE account and lure a victim to the resulting callback URL. The application then logs the victim into the attacker's account. When account linking is enabled, the same gap lets the attacker bind their LINE identity to the victim's existing account, creating a persistent unauthorized login path. The weakness is tracked as [CWE-352] Cross-Site Request Forgery.
Critical Impact
Victims can be silently authenticated into attacker-controlled accounts, and attacker identities can be permanently linked to victim accounts when account linking is enabled.
Affected Products
- social-core versions prior to 5.0.2 with the LINE backend enabled
- Applications built on python-social-auth that register the LINE OAuth provider
- Downstream frameworks relying on social-core for LINE social login
Discovery Timeline
- 2026-10-15 - CVE-2026-62322 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-62322
Vulnerability Analysis
The LINE backend in social-core implements OAuth 2.0 but omits validation of the state parameter returned on the callback. OAuth state is the standard anti-CSRF binding between the browser that initiated the flow and the browser that completes it. Without this check, the server accepts any authorization code delivered to the callback URL and exchanges it for a LINE access token tied to whichever account authorized the request.
An attacker starts the login flow using their own LINE credentials, intercepts the resulting authorization URL, and delivers the callback link to a victim through phishing or an embedded redirect. When the victim visits the link while already authenticated to the vulnerable application, the application completes authentication against the attacker's LINE identity. If SOCIAL_AUTH_* account linking is enabled, the attacker's LINE identity becomes a permanent login method for the victim's account.
Root Cause
The auth_complete method in social_core/backends/line.py called request_access_token directly after process_error, skipping the inherited validate_state check that other OAuth2 backends perform. The missing call broke the CSRF protection that the base class provides.
Attack Vector
Exploitation is network-based and requires user interaction: the victim must click an attacker-supplied callback URL. No privileges are required on the target application. The fix adds a single self.validate_state() call to reject callbacks that do not match the state issued at authorization time.
def auth_complete(self, *args, **kwargs):
"""Completes login process, must return user instance"""
self.process_error(self.data)
+ self.validate_state()
try:
response = self.request_access_token(
Source: GitHub commit 5b3b90d
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-62322
Indicators of Compromise
- Callback requests to the LINE OAuth endpoint missing a state query parameter, or with a state value that was never issued by the application.
- Successful LINE logins where the authenticated session cookie predates the OAuth callback, indicating a cross-session account takeover.
- New UserSocialAuth records linking a LINE provider identity to an existing local account outside of a user-initiated linking workflow.
Detection Strategies
- Inspect application logs for /complete/line/ or equivalent callback paths that lack the state parameter, or whose state fails server-side comparison once a patched build is deployed.
- Correlate authentication events with the originating session identifier to detect flows where the browser issuing authorization differs from the browser completing it.
- Audit social_auth_usersocialauth records for LINE provider additions that are not accompanied by an explicit user-initiated linking action.
Monitoring Recommendations
- Alert on repeated LINE OAuth callbacks sharing the same code value or originating from unexpected referrers.
- Monitor for spikes in account linking events for the LINE provider across the user base.
- Forward Django or framework authentication logs to a centralized store so OAuth callback anomalies can be correlated with session activity.
How to Mitigate CVE-2026-62322
Immediate Actions Required
- Upgrade social-auth-core to version 5.0.2 or later across all services that enable the LINE backend.
- Audit UserSocialAuth entries for the LINE provider created before the upgrade and revoke suspicious linkages.
- Force re-authentication for user accounts that completed a LINE login during the vulnerable window.
Patch Information
The fix is published in social-core release 5.0.2 and discussed in pull request #1829. Full advisory details are available in GHSA-526j-582w-7fm9. The commit 5b3b90d adds the missing self.validate_state() call to the LINE backend's auth_complete method.
Workarounds
- Temporarily disable the LINE backend by removing it from AUTHENTICATION_BACKENDS until the upgrade is deployed.
- Disable automatic account linking for social providers to limit the persistence impact of a successful attack.
- Enforce short-lived OAuth session cookies and require re-authentication before sensitive operations.
# Pin the fixed release in requirements
pip install 'social-auth-core>=5.0.2'
# Verify the installed version
python -c "import social_core; print(social_core.__version__)"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

