# CVE-2025-65431: django-allauth Improper Authentication in Okta and NetIQ providers

Source: https://junglewise.ai/threats/cve-2025-65431-django-allauth-improper-authentication-in-okta-and-netiq  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-15. Updated: 2026-06-05  
License: CC BY 4.0 with a link back

CVE-2025-65431 · Severity: medium · CVSS 5.4 · Published 2025-12-15

A security issue was identified in django-allauth, a popular authentication package for Django websites. When using Okta or NetIQ for logins, the system relied on usernames that could be changed by users rather than permanent, unique IDs. This could potentially allow an attacker to gain unauthorized access to another user's account if they are able to claim a previously used or modified username.

Technologies: [Pennersr Allauth](https://junglewise.ai/threats/technologies/allauth), [django-allauth (PyPI)](https://junglewise.ai/threats/technologies/django-allauth). Vendors: [Pennersr](https://junglewise.ai/threats/vendors/pennersr), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-65431 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-65431 being exploited in the wild.

**How severe is CVE-2025-65431?** Medium severity, with a CVSS score of 5.4, published 15 December 2025.

**Which products and versions are affected?** Pennersr Allauth < 65.13.0; django-allauth (PyPI) < 65.13.0, ECOSYSTEM:introduced=0,fixed=65.13.0.

**Is there a fix for CVE-2025-65431?** Yes. django-allauth (PyPI): upgrade to 65.13.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-65431 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-65431?** Check whether you run Allauth, Pennersr Allauth or django-allauth (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- django-allauth (PyPI): upgrade to 65.13.0 or later

  ```sh
  pip install "django-allauth>=65.13.0"
  ```


## Technical details

The Okta and NetIQ provider implementations in django-allauth prior to version 65.13.0 used the 'preferred_username' field as the unique identifier for third-party accounts. Because this field is mutable in some identity provider configurations, it does not meet the requirements for a stable unique identifier. An attacker with the ability to change their username on the identity provider side could potentially link their social account to a different local user account. The fix migrates these providers to use the 'sub' (subject) claim, which is an immutable identifier. Users upgrading to 65.13.0 may need to manually migrate existing SocialAccount records to prevent account linkage issues.

## Affected products

- allauth django-allauth < 65.13.0

## Identifiers

- CVE-2025-65431
- GHSA-8m3c-c723-h4p4
- PYSEC-2025-111

## Timeline

- 2025-10-31: patched: Version 65.13.0 released with fix
- 2025-12-15: disclosed: CVE-2025-65431 published
- 2025-12-15: advisory: GitHub Advisory GHSA-8m3c-c723-h4p4 published

## References

- [https://allauth.org/news/2025/10/django-allauth-65.13.0-released](https://allauth.org/news/2025/10/django-allauth-65.13.0-released)
- [https://github.com/pennersr/django-allauth/commit/8feef46e0e07b25fc5594c8f268afa247ebc3412](https://github.com/pennersr/django-allauth/commit/8feef46e0e07b25fc5594c8f268afa247ebc3412)
- [https://github.com/pypa/advisory-database/tree/main/vulns/django-allauth/PYSEC-2025-111.yaml](https://github.com/pypa/advisory-database/tree/main/vulns/django-allauth/PYSEC-2025-111.yaml)

## Related threats

- [django-allauth open redirect in SAML IdP-initiated SSO](https://junglewise.ai/threats/cve-2026-27982-django-allauth-open-redirect-in-saml-idp-initiated-sso)
- [django-allauth insufficient session expiration for inactive users](https://junglewise.ai/threats/cve-2025-65430-django-allauth-insufficient-session-expiration-for-inactive-users)
