CVE-2024-39329: Django Django Vulnerable To User Enumeration Vulnerability

MODERATE
Advisory Identifier: GHSA-x7q2-wr7g-xqmf
CVSS 5.3
CWE-208
Published
Advisory Summary

CVE-2024-39329 is a MODERATE (CVSS 5.3) django vulnerable to user enumeration vulnerability (CWE-208: Observable Timing Discrepancy) affecting Django libraries in the PyPI ecosystem. The issue involves django vulnerable to user enumeration attack. Remediation is available by upgrading affected packages to version 5.0.7, 4.2.14.

CVE-2024-39329 at a Glance

CVE Identifier CVE-2024-39329
GHSA Identifier GHSA-x7q2-wr7g-xqmf
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-208: Observable Timing Discrepancy
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-39329

To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Django fixed: 5.0.7
pip install Django>=5.0.7
Django fixed: 4.2.14
pip install Django>=4.2.14
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Django

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-39329, inspect your installed packages using pip:

pip show Django

Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.7), your application is affected.

Note: The pip show Django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-208: Observable Timing Discrepancy, where two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14. The `django.contrib.auth.backends.ModelBackend.authenticate()` method allows remote attackers to enumerate users via a timing attack involving login requests for users with an unusable password.

CVE-2024-39329 Affected Django Versions

2 component(s)
Fixed Versions:
5.0.74.2.14
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
≥ 5.0
< 5.0.7
5.0.7
Django
PyPI
≥ 4.2
< 4.2.14
4.2.14

References

Frequently Asked Questions

What is CVE-2024-39329?
CVE-2024-39329 is a security vulnerability in Django involving Django vulnerable to user enumeration attack under CWE-208: Observable Timing Discrepancy.
Which Django versions are affected?
Affected versions include releases prior to 5.0.7, 4.2.14 across affected packages: Django.
What version fixes CVE-2024-39329?
Upgrading to 5.0.7, 4.2.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 5.0.7, 4.2.14. Upgrade your dependency to 5.0.7, 4.2.14 or later.
What is the CVSS score of CVE-2024-39329?
CVE-2024-39329 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-39329?
CVE-2024-39329 is classified under CWE-208: Observable Timing Discrepancy (Two separate operations in a product require different amounts of time to complete, in a way that is observable to an actor and reveals security-relevant information about the state of the product, such as whether a particular operation was successful or not.).
How can I check PyPI dependencies for CVE-2024-39329?
Run the dependency tree command: 'pip show Django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x7q2-wr7g-xqmf",
  "modified" : "2025-11-04T19:47:54Z",
  "published" : "2024-07-10T06:33:52Z",
  "aliases" : [ "CVE-2024-39329" ],
  "summary" : "Django vulnerable to user enumeration attack",
  "details" : "An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14. The `django.contrib.auth.backends.ModelBackend.authenticate()` method allows remote attackers to enumerate users via a timing attack involving login requests for users with an unusable password.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2"
      }, {
        "fixed" : "4.2.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39329"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/07cefdee4a9d1fcd9a3a631cbd07c78defd1923b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/156d3186c96e3ec2ca73b8b25dc2ef366e38df14"
  }, {
    "type" : "WEB",
    "url" : "https://docs.djangoproject.com/en/dev/releases/security"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2024-57.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#%21forum/django-announce"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20240808-0005"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2024/jul/09/security-releases"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-10T21:42:19Z",
    "nvd_published_at" : "2024-07-10T05:15:12Z"
  }
}