django-allauth
CVE-2025-65431
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain account at Okta/NetIQ IdP
-
DeliverySet preferred_username to match victim identifier
-
ExploitAuthenticate to allauth-backed app
-
Executionallauth maps session to victim account
-
ImpactAccess victim data and privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication mechanism validation
MITRE ATT&CK
2 techniques across 2 tactics: Defense Evasion, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the django-allauth deployment to be configured with the Okta or NetIQ third-party login provider specifically - other providers are unaffected because only these two used the mutable 'preferred_username' claim as the account identifier. The attacker must possess a valid account at that identity provider (PR:L) and be able to set or change their 'preferred_username' value to collide with a target user's identifier; there is no user-interaction requirement (UI:N). Limiting factors: deployments not using Okta/NetIQ SSO are not exploitable, and the IdP's own controls over whether 'preferred_username' can be freely modified by an end user constrain feasibility. Upgrading to django-allauth 65.13.0 (which switches these providers to the immutable 'sub' claim) removes the condition entirely. |
| Impact | This is a moderate-severity authentication/authorization flaw (CWE-287) in django-allauth, not an urgent, widely-exploitable issue. The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N, base 5.4) indicates network reach but requires the attacker to already hold privileges (PR:L) - consistent with needing a valid account at the identity provider. No EPSS score, KEV listing, or POC was provided, so there is no evidence of active exploitation or public exploit code; the risk is therefore theoretical/targeted rather than widespread. Importantly, exploitation is strictly gated: it only affects deployments that use Okta or NetIQ as third-party (social) login providers, because only those two providers used the mutable 'preferred_username' claim as the account identifier. The practical risk is a targeted account-takeover opportunity where an attacker who can alter their own 'preferred_username' at the IdP to match a victim's could be mapped onto the victim's local account. I would prioritize this for organizations using django-allauth with Okta/NetIQ SSO, and treat it as low urgency otherwise. Note a tension between the vendor-assigned C:L/I:L and the real impact: a successful identifier collision can yield full takeover of the victim's application account, which is arguably higher impact than L/L suggests. |
| Exploit ScenarioDerived | An application uses django-allauth (pre-65.13.0) with Okta or NetIQ SSO. An attacker who controls an account at that identity provider changes their 'preferred_username' to match the value associated with a victim's account; because allauth keyed the local account on this mutable claim rather than the stable 'sub', the attacker's login is mapped onto the victim's account, resulting in account takeover. No public exploit code was identified at time of analysis, and the attack requires the attacker to possess and manipulate an IdP account. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Authentication bypass in django-allauth versions before 65.13.0 allows an authenticated attacker with a valid Okta or NetIQ identity provider account to impersonate other users by modifying the mutable 'preferred_username' claim used as the account identifier, potentially leading to account takeover. This moderate-severity flaw (CWE-287) only affects deployments configured with these specific third-party login providers, and exploitation requires the attacker to be able to set or change their preferred_username value. No public exploit code or active exploitation has been identified at time of analysis; the vendor has released patch 65.13.0 which switches to the immutable 'sub' claim.
RemediationAI
Upgrade to django-allauth version 65.13.0 or later, which switches the Okta and NetIQ providers to use the immutable 'sub' claim for account identification; this is the definitive fix and removes the vulnerability entirely. If immediate upgrade is not possible, consider disabling the Okta and NetIQ third-party login providers in your django-allauth configuration, or ensure that the 'preferred_username' claim cannot be modified by users at the identity provider (though this may not be under your control). Disabling these providers will prevent users from logging in via Okta or NetIQ until the patch is applied. Monitor authentication logs for suspicious account linking or access anomalies. See the vendor advisory at https://allauth.org/news/2025/10/django-allauth-65.13.0-released/ for details.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
django-allauth is a Django library that provides authentication and third-party (social) login integrations. The vulnerability resides in its Okta and NetIQ provider backends, which incorrectly used the 'preferred_username' claim from the identity provider's token as the unique account identifier for authorization decisions. Because 'preferred_username' is mutable and can often be changed by the user at the identity provider, an attacker could set it to the value of a target user's identifier and gain unauthorized access to that user's account. The root cause is CWE-287: Improper Authentication, as the system relied on a non-immutable identifier. The fix in version 65.13.0 changes these providers to use the 'sub' claim, which is immutable and unique. Other third-party providers in django-allauth were not affected because they used different, immutable claims.
Know when Allauth gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Attacker needs an IdP account and must engineer a mutable-claim collision (PR:L, AC:H); on success it yields full takeover of the victim's app account (C:H/I:H), no availability impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
DescriptionCVE.org
An issue was discovered in allauth-django before 65.13.0. Both Okta and NetIQ were using preferred_username as the identifier for third-party provider accounts. That value may be mutable and should therefore be avoided for authorization decisions. The providers are now using sub instead.
Blast Radius
ecosystem impact- 1 pypi packages depend on django-allauth (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 65.13.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB