CVE-2026-115910: Python Social Auth: OpenID Connect nonce is not bound to the browser session, so a stolen authorization code logs the attacker in as the victim
Python Social Auth is a social authentication and registration mechanism. Prior to 6.2.0, OpenIdConnectAuth in socialcore/backends/openidconnect.py uses getandstorenonce to place the OpenID Connect nonce in a shared OpenIdConnectAssociation table, and getnonce and validateclaims verify only that the nonce exists and has not expired rather than binding it to the browser session and OAuth state that initiated the login. An attacker who obtains a victim's unused authorization code can start a separate login to obtain valid state for the attacker's browser, submit the victim's code with that state, and pass nonce validation because the victim nonce is globally available. With DEFAULTUSEPKCE disabled in the default OpenIdConnectAuth configuration, the attacker can be logged in as the victim. This issue is fixed in version 6.2.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Python Social Authto a version that resolves this vulnerability.Fixed in 6.2.0 - Configuration
Enable DEFAULT_USE_PKCE; when it is disabled, an attacker can be logged in as the victim.
OpenIdConnectAuth DEFAULT_USE_PKCE = enabled
Event History
Frequently Asked Questions
Which deployments are affected?
Deployments using social-auth-core's OpenIdConnectAuth before version 6.2.0 are affected when DEFAULT_USE_PKCE is disabled, which is the default OpenIdConnectAuth configuration described here.
What does an attacker need to exploit this issue?
The attacker needs to obtain a victim's unused OpenID Connect authorization code. They can then initiate a separate login in their own browser to obtain valid state and submit the victim's code with that state.
What is the impact of a successful exploit?
A successful attacker can be logged in as the victim. The affected nonce validation accepts a globally stored, unexpired nonce without binding it to the browser session or OAuth state that initiated the victim's login.
What should teams do to remediate the issue?
Upgrade social-auth-core to version 6.2.0, which fixes the issue. The provided information identifies DEFAULT_USE_PKCE being disabled as a condition for exploitation.