KEVWire

Security intelligence, with context.

Response snapshot Oct 29, 2026, 02:31 UTC

Back to the wire
Permalink
VulnerabilityCVE-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

The generic OpenID Connect backend (OpenIdConnectAuth and every backend built on it) stores the nonce in the shared Association table, not in the user's session. When the ID token comes back, validate_claims only checks that the nonce exists in that table and is not expired.

At a glance

Exploited
Not known
Severity
6.8 Medium (CVSS 3.1)
Chance of exploitation
0.2% in the next 30 days
Sources
1 source

What to do

GitHub lists first patched versions: social-auth-core: 6.2.0. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-h2r5-x5m7-3935 (opens a new tab)

What happened

Summary

The generic OpenID Connect backend (OpenIdConnectAuth and every backend built on it) stores the nonce in the shared Association table, not in the user's session. When the ID token comes back, validate_claims only checks that the nonce exists in that table and is not expired. It does not check that the nonce was issued to the browser that is finishing the login.

So the nonce does not do its job. OIDC Core (section 15.5.2) and RFC 9700 (section 4.5) use the nonce to stop authorization code injection: an attacker who gets hold of a victim's unused authorization code should not be able to redeem it in the attacker's own browser. With social-auth-core, the attacker can.

They start their own login to get a valid state for their session, then hit the callback with the victim's code and their own state. state passes because it belongs to the attacker's session, and the nonce in the victim's ID token passes because it is in the global table. The attacker's browser is now logged in as the victim.

Continue reading

PKCE would block this, but OpenIdConnectAuth sets DEFAULT_USE_PKCE = False (the OAuth2 base class defaults to True), so the nonce is the only binding in the default setup.

Tested versions

social-auth-core 6.1.1 (latest), 6.1.0 and 5.2.0, with social-auth-app-django 7.1.0 and Django 6.1.2, Python 3.14. The same code is on master (098ef399c1).

Details

social_core/backends/open_id_connect.py in 6.1.1:

- line 252: auth_params calls get_and_store_nonce(self.authorization_url(), state) - lines 333 to 346: get_and_store_nonce stores the nonce as an OpenIdConnectAssociation keyed by server_url and handle=nonce. The state goes into assoc_type but is never read back. - lines 348 to 358: get_nonce looks the nonce up by server_url and handle only - lines 393 to 415: validate_claims accepts any stored, unexpired nonce and removes it - line 110: DEFAULT_USE_PKCE = False

PoC

Everything runs locally. mockidp.py is a small OpenID provider on 127.0.0.1 that checks redirect_uri and enforces PKCE when a code_challenge was sent, like a normal provider. social_nonce.py uses two Django test clients as two browsers.

pip install social-auth-core social-auth-app-django django pyjwt cryptography
python social_nonce.py

Output on 6.1.1:

[inject] attacker session completes with victim code: (200, 'user=victim')

Controls:

MODE=control_victim python social_nonce.py
[control] victim completes normally: (200, 'user=victim')

MODE=control_unknown_nonce python social_nonce.py
[control] unknown nonce: ('EXC', 'AuthResponseError: The authentication response could not be matched to the request.')

PKCE=1 python social_nonce.py
[inject] attacker session completes with victim code: ('EXC', 'AuthCredentialError: The authorization code was rejected. Please restart login.')

So the nonce check runs, but it accepts a nonce that belongs to another browser. With PKCE on, the same attack fails.

mockidp.py:

"""Minimal local OpenID Provider on 127.0.0.1 for testing RP libraries."""
import json, time, secrets, threading, hashlib, base64, urllib.parse
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import jwt
from cryptography.hazmat.primitives.asymmetric import rsa

def b64u(b): return base64.urlsafe_b64encode(b).rstrip(b"=").decode()

class IdP:
 def __init__(self, port=0, client_id="rp-client", client_secret="rp-secret", name="idp"):
 self.key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
 self.kid = name + "-k1"
 self.client_id, self.client_secret = client_id, client_secret
 self.codes = {}
 self.access = {}
 self.claims_override = {}
 self.srv = ThreadingHTTPServer(("127.0.0.1", port), self._handler())
 self.port = self.srv.server_address[1]
 self.issuer = f"http://127.0.0.1:{self.port}"
 threading.Thread(target=self.srv.serve_forever, daemon=True).start()

 def jwk(self):
 n = self.key.public_key().public_numbers()
 tb = lambda i: i.to_bytes((i.bit_length() + 7) // 8, "big")
 return {"kty": "RSA", "kid": self.kid, "use": "sig", "alg": "RS256", "n": b64u(tb(n.n)), "e": b64u(tb(n.e))}

 def discovery(self):
 i = self.issuer
 return {"issuer": i, "authorization_endpoint": i + "/authorize", "token_endpoint": i + "/token",
 "userinfo_endpoint": i + "/userinfo", "jwks_uri": i + "/jwks",
 "response_types_supported": ["code"], "subject_types_supported": ["public"],
 "id_token_signing_alg_values_supported": ["RS256"],
 "token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post"],
 "code_challenge_methods_supported": ["S256"]}

 def user_authorizes(self, authorize_url, sub):
 """The end user `sub` approves an authorization request; returns (code, params)."""
 q = dict(urllib.parse.parse_qsl(urllib.parse.urlsplit(authorize_url).query))
 code = "code-" + secrets.token_hex(8)
 self.codes[code] = {"sub": sub, "nonce": q.get("nonce"), "redirect_uri": q.get("redirect_uri"),
 "code_challenge": q.get("code_challenge")}
 return code, q

 def sign(self, claims):
 return jwt.encode(claims, self.key, algorithm="RS256", headers={"kid": self.kid})

 def _handler(idp):
 class H(BaseHTTPRequestHandler):
 def log_message(self, *a): pass
 def _json(self, obj, code=200):
 b = json.dumps(obj).encode()
 self.send_response(code); self.send_header("Content-Type", "application/json")
 self.send_header("Content-Length", str(len(b))); self.end_headers(); self.wfile.write(b)
 def do_GET(self):
 p = urllib.parse.urlsplit(self.path).path
 if p.endswith("/.well-known/openid-configuration"): return self._json(idp.discovery())
 if p == "/jwks": return self._json({"keys": [idp.jwk()]})
 if p == "/userinfo":
 tok = (self.headers.get("Authorization") or "").split(" ")[-1]
 sub = idp.access.get(tok)
 if not sub: return self._json({"error": "invalid_token"}, 401)
 return self._json({"sub": sub, "email": sub + "@example.test", "preferred_username": sub})
 return self._json({"error": "not_found"}, 404)
 def 

Affected package ranges reported by GitHub:
social-auth-core: <= 6.1.1

Scores and how they were measured

CVSS base severity

6.8

Version 3.1As of

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

0.2%

Scored Percentile 4.8%

Model and measurement source (opens a new tab)

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-h2r5-x5m7-3935 (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-h2r5-x5m7-3935, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

  3. Primary source

    FIRST measured EPSS score (opens a new tab)

    Measured EPSS probability and percentile for CVE-2026-115910, scored 2026-10-28. This is a model estimate, not proof of exposure.

    Published Checked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 28). 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 (CVE-2026-115910). https://kevwire.com/record/CVE-2026-115910

MLA

"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 (CVE-2026-115910)." KEVWire, 28 Oct. 2026, kevwire.com/record/CVE-2026-115910.

Chicago

KEVWire. "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 (CVE-2026-115910)." Last modified October 28, 2026. https://kevwire.com/record/CVE-2026-115910.

Evidence summary (plain text)

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 (Oct 28, 2026).
The generic OpenID Connect backend (OpenIdConnectAuth and every backend built on it) stores the nonce in the shared Association table, not in the user's session. When the ID token comes back, validate_claims only checks that the nonce exists in that table and is not expired. It does not check that the nonce was issued to the browser that is finishing the login.

So the nonce does not do its job.
CVSS 6.8 (version 3.1; evidence as of Oct 28, 2026; https://github.com/advisories/GHSA-h2r5-x5m7-3935).
EPSS 0.2% for the following 30 days, scored Oct 28, 2026 (https://api.first.org/data/v1/epss?cve=CVE-2026-115910&date=2026-10-28).
Sources:
GitHub-reviewed advisory GHSA-h2r5-x5m7-3935: https://github.com/advisories/GHSA-h2r5-x5m7-3935
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
FIRST measured EPSS score: https://api.first.org/data/v1/epss?cve=CVE-2026-115910&date=2026-10-28
Record ID: CVE-2026-115910.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 29, 2026, 02:16 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are coming as part of KEVWire Premium: join the waitlist. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail