CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-57177

CVE-2026-57177: Login Cross-Site Request Forgery in python-social-auth (social-auth-core)

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 24, 2026·7 min read·2 visits

Executive Summary (TL;DR)

Unvalidated OAuth state in the LoginRadius backend of social-auth-core allows unauthenticated attackers to hijack victim sessions via Login CSRF.

A Login Cross-Site Request Forgery (Login CSRF) vulnerability was discovered in the social-auth-core library prior to version 5.0.0 when utilizing the LoginRadius authentication backend. The backend explicitly disabled state token validation during the authentication callback, allowing attackers to link their identities to victim sessions.

Vulnerability Overview

social-auth-core is a Python library that provides a common framework for integrating social authentication and authorization mechanisms into web frameworks such as Django, Flask, and Webpy. The library contains multiple backend plugins corresponding to various identity providers. The LoginRadius authentication backend, implemented in social_core.backends.loginradius.LoginRadiusAuth, is designed to handle user sign-in flows using the third-party LoginRadius identity service.

Prior to version 5.0.0, the LoginRadius backend failed to enforce the generation or verification of the OAuth 2.0 state parameter during authentication. This omission exposes applications relying on this backend to Login Cross-Site Request Forgery (Login CSRF) attacks. This vulnerability is designated as CVE-2026-57177 and GHSA-x7qq-23vw-7pfg, and is classified under CWE-352.

The attack surface exists on the web application's callback endpoint. When a user authenticates via a third-party identity provider, the application must verify that the authentication response corresponds to a request initiated by that same user's browser session. Absent this state check, an attacker can manipulate a victim's session to bind to an identity provider account controlled by the attacker.

Root Cause Analysis

The root cause of CVE-2026-57177 lies in the configuration flags of the LoginRadiusAuth class in the social-auth-core package. Specifically, the class set the class-level variable REDIRECT_STATE to False and STATE_PARAMETER to False. The underlying social-core engine uses these variables to determine whether to perform anti-CSRF token verification during the OAuth callback phase. By setting REDIRECT_STATE to False, the developer configuration explicitly disabled the built-in state verification mechanisms.

In standard OAuth 2.0 flows, the state parameter is generated dynamically prior to redirecting the user to the provider. The value is stored in the user's session. When the provider redirects the user back to the application's callback URL, the application checks the URL parameter named state against the value in the active session. If the two values do not match, the authentication flow is terminated immediately to prevent session hijacking and CSRF.

Without these safeguards in the LoginRadius backend, the application callback endpoint blindly accepts authentication tokens provided in the URL query parameters. This architectural design decision allowed authentication callback requests to be replayed or submitted across domains without validating the original state of the initiating browser session. Consequently, any active session could be targeted to complete an authentication loop using an arbitrary third-party token.

Code Analysis

The vulnerable implementation of LoginRadiusAuth in social_core/backends/loginradius.py did not implement any code path for state generation or validation. The auth_html method, which is responsible for initiating the authentication flow and rendering the redirection target, generated a callback URI without injecting a state variable. The following code snippet demonstrates the vulnerable class definition before the remediation patch:

class LoginRadiusAuth(BaseOAuth2):
    # ...
    ID_KEY = "ID"
    ACCESS_TOKEN_URL = "https://api.loginradius.com/api/v2/access_token"
    PROFILE_URL = "https://api.loginradius.com/api/v2/userprofile"
    REDIRECT_STATE = False    # Vulnerable: State generation and validation disabled
    STATE_PARAMETER = False
 
    def uses_redirect(self) -> bool:
        return False
 
    def auth_html(self):
        key, _secret = self.get_key_and_secret()
        tpl = self.setting("TEMPLATE", "loginradius.html")
        return self.strategy.render_html(
            tpl=tpl,
            context={
                "backend": self,
                "LOGINRADIUS_KEY": key,
                "LOGINRADIUS_REDIRECT_URL": self.get_redirect_uri(), # Vulnerable: No state token is passed
            },
        )

The patch committed under SHA 4d332820e6b0583fde522956105a0e2beced5335 resolves this issue by modifying the class variable REDIRECT_STATE = True and updating the authentication initiation logic. The auth_html method now obtains or generates a state token via self.get_or_create_state() and passes it to both the template context and the get_redirect_uri function. The patched code is shown below:

class LoginRadiusAuth(BaseOAuth2):
    # ...
    ID_KEY = "ID"
    ACCESS_TOKEN_URL = "https://api.loginradius.com/api/v2/access_token"
    PROFILE_URL = "https://api.loginradius.com/api/v2/userprofile"
    REDIRECT_STATE = True     # Patched: Enables state validation
    STATE_PARAMETER = False
 
    def uses_redirect(self) -> bool:
        return False
 
    def auth_html(self):
        key, _secret = self.get_key_and_secret()
        state = self.get_or_create_state() # Patched: Generates and registers state token
        tpl = self.setting("TEMPLATE", "loginradius.html")
        return self.strategy.render_html(
            tpl=tpl,
            context={
                "backend": self,
                "LOGINRADIUS_KEY": key,
                "LOGINRADIUS_REDIRECT_STATE": state,
                "LOGINRADIUS_REDIRECT_URL": self.get_redirect_uri(state), # Patched: Appends state to callback URI
            },
        )

This code-level change ensures that when the browser requests the LoginRadius callback endpoint, the engine demands a matching redirect_state parameter. The validation logic is delegated to the core class implementation, which throws an exception if the parameter is missing or mismatched.

Exploitation

Exploitation of CVE-2026-57177 requires the attacker to construct a valid third-party authentication payload and force the victim's browser to submit it to the application's callback endpoint. The target application must have the LoginRadius authentication backend enabled. The attacker begins by initiating the authentication process against the target application using their own LoginRadius credentials. The attacker intercepts the redirection response from LoginRadius containing the login token.

Instead of completing the login flow within their own browser, the attacker extracts the token parameter from the redirected callback URL. This token is associated with the attacker's LoginRadius identity and remains valid for a limited period. The attacker then constructs a malicious payload, such as an invisible img element or an iframe, hosted on a website controlled by the attacker or injected via HTML injection into a trusted site.

<!-- Malicious cross-site request targeting the victim's session -->
<img src="https://target-app.example/complete/loginradius/?token=ATTACKER_TOKEN_HERE" style="display:none;" />

When the victim visits the attacker-controlled webpage, the victim's browser automatically submits the HTTP request to the target application's callback endpoint. Because the target application does not validate the state parameter on the callback, the framework processes the attacker's token. The victim's application session is subsequently mapped to the attacker's external LoginRadius identity. If the target application supports account linking, the attacker's third-party login credentials become persistently bound to the victim's local account.

Impact Assessment

The primary consequence of this Login CSRF vulnerability is unauthorized session manipulation and persistent identity linking. Once an attacker successfully binds their LoginRadius identity to the victim's application account, the attacker can log into the victim's account at any time by executing a standard OAuth login using the bound LoginRadius profile. This bypasses authentication controls and provides full, persistent access to the victim's data and privileges within the application.

In scenarios where the victim is already logged into the application, the injection of the attacker's token associates the victim's active session with the attacker's account. Any sensitive actions performed by the victim, such as entering payment information, saving personal documents, or submitting sensitive queries, will be saved under the attacker's account history. The attacker can then view these transactions by logging into their own account.

The CVSS v3.1 score of 4.3 is characterized by low complexity (AC:L) and network accessibility (AV:N), with user interaction (UI:R) required. While confidentiality impacts are evaluated as low to none initially, the logical downstream impact of identity binding represents a critical threat to user privacy and data integrity. Applications utilizing the LoginRadius backend must treat this as a high-risk security flaw.

Remediation & Defense-in-Depth

The primary resolution is to upgrade the social-auth-core dependency to version 5.0.0 or higher. The package update implements the robust validation of the state parameter in the LoginRadius backend module and addresses unit test coverage to prevent regression. Administrators can upgrade the package using Python package management utilities.

pip install --upgrade social-auth-core>=5.0.0

If immediate software upgrade is unfeasible, administrators must disable the LoginRadius authentication backend. In Django applications, this involves removing the specific backend path from the AUTHENTICATION_BACKENDS setting in the project configuration files. Applications must verify that no other custom OAuth backends have REDIRECT_STATE set to False unless there is a specific, secure alternative state management mechanism in place.

# settings.py modification
AUTHENTICATION_BACKENDS = (
    # Disable the vulnerable backend immediately if upgrading is not possible
    # 'social_core.backends.loginradius.LoginRadiusAuth',
    'social_core.backends.google.GoogleOAuth2',
    'django.contrib.auth.backends.ModelBackend',
)

To ensure defense-in-depth, security teams should configure session cookies with appropriate flags. Setting SameSite=Lax or SameSite=Strict on session cookies ensures that web browsers will omit credentials from third-party requests, significantly lowering the exploitability of cross-site request forgery attacks on endpoints that rely on cookie-based authentication sessions.

Fix Analysis (1)

Technical Appendix

CVSS Score
4.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Affected Systems

python-social-authsocial-auth-core

Affected Versions Detail

Product
Affected Versions
Fixed Version
social-auth-core
python-social-auth
< 5.0.05.0.0
AttributeDetail
CWE IDCWE-352
Attack VectorNetwork
CVSS Score4.3 (Medium)
EPSS ScoreN/A (Not actively indexed)
ImpactIntegrity Loss (Identity mapping manipulation)
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
CWE-352
Cross-Site Request Forgery (CSRF)

The web application does not, or cannot, sufficiently verify whether a well-formed, valid, consistent request was intentionally sent by the user who submitted it.

Known Exploits & Detection

GitHubIntegrated programmatic unit tests demonstrating the bypass of the state parameter in affected versions and validation of correct state verification in patched environments.

Vulnerability Timeline

Fix commit merged into python-social-auth master branch
2026-06-22
Version 5.0.0 containing the fix is released
2026-06-23
CVE-2026-57177 publicly disclosed and assigned
2026-09-01

References & Sources

  • [1]GitHub Security Advisory: GHSA-x7qq-23vw-7pfg
  • [2]Pull Request #1808
  • [3]Fix Commit 4d332820e6b0583fde522956105a0e2beced5335
  • [4]social-core 5.0.0 Release
  • [5]NVD CVE-2026-57177 Detail
  • [6]CVE Org Portal CVE-2026-57177

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•13 minutes ago•CVE-2026-57176
6.8

CVE-2026-57176: Multi-Tenant Account Takeover via Identity Binding Collision in python-social-auth Vend Backend

An identity binding collision vulnerability in the Vend OAuth2 backend of python-social-auth (social-core) before version 5.0.0 allows unauthenticated remote attackers to take over local accounts in multi-tenant configurations. The flaw stems from relying on shop-local numeric user IDs as global social-auth identifiers, leading to collisions when identical IDs exist across distinct tenants.

Alon Barad
Alon Barad
0 views•6 min read
•about 2 hours ago•CVE-2026-57178
7.4

CVE-2026-57178: Authentication Bypass via Missing Signature Verification in social-auth-core

An authentication bypass vulnerability exists in the VKontakte App backend of social-auth-core prior to version 5.0.0. The vulnerability allows remote attackers to bypass cryptographic signature verification and gain unauthorized access to arbitrary accounts by omitting the signature parameter.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 3 hours ago•CVE-2026-57179
4.2

CVE-2026-57179: Session Fixation and Login CSRF in social-auth-core Partial Pipeline

CVE-2026-57179 is a critical Session Fixation and Login Cross-Site Request Forgery (CSRF) vulnerability in python-social-auth's core library (social-auth-core) prior to version 5.0.0. The vulnerability allows remote attackers to force arbitrary state transitions and bind third-party social credentials to a victim's session, leading to complete account takeover.

Alon Barad
Alon Barad
6 views•7 min read
•about 4 hours ago•CVE-2026-57232
3.1

CVE-2026-57232: Server-Side Request Forgery in Contao CMS Feed Reader Module

A Server-Side Request Forgery (SSRF) vulnerability exists in the Contao Open Source Content Management System (CMS) within the Feed Reader front-end module. When processing RSS feed configurations, the module initiates outbound HTTP connections using a default HTTP client that lacks loopback and private network controls. Authenticated backend users with permissions to configure frontend modules can exploit this flaw to coerce the server into sending requests to internal endpoints, loopback addresses, and cloud instance metadata services.

Amit Schendel
Amit Schendel
7 views•7 min read
•about 5 hours ago•CVE-2026-63498
8.7

CVE-2026-63498: Stored Cross-Site Scripting via Inline XML Rendering in Snipe-IT API

CVE-2026-63498 is a high-severity Stored Cross-Site Scripting (XSS) vulnerability in Snipe-IT prior to version 8.7.0. The flaw resides in the REST API's file retrieval endpoint, which allows files to be rendered inline without sanitizing or restricting malicious content types like XML and XSLT stylesheets, leading to browser-side script execution in the context of the application's origin.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 6 hours ago•CVE-2026-19730
4.2

CVE-2026-19730: Podman Quadlet Install Non-Truncating Write Retains Removed Host-Access/Security Directives

CVE-2026-19730 is a local security vulnerability in the Podman container engine's Quadlet systemd generator. When updating existing configurations using 'podman quadlet install --replace' on filesystems that do not support reflink operations (such as standard ext4), the file is opened without the O_TRUNC flag. If the new configuration file is shorter than the pre-existing file, the trailing lines of the old file remain intact and are successfully parsed by systemd, leading to a failure to remove security-critical parameters like AddCapability, User, or host storage mounts.

Alon Barad
Alon Barad
6 views•7 min read