Cloudanix VulnDB

CVE-2024-39329

Medium · 5.3

CVSS

5.3

EPSS

0.9%

Published

Jul 10, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in Django lets attackers guess which usernames exist by measuring how long login attempts take, making it easier for them to target real accounts.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Web Framework
Class
Information Disclosure
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The ModelBackend.authenticate() method in affected Django versions leaks information about user existence through measurable differences in response timing when processing login requests for accounts configured with unusable passwords.

Why it matters to the business

Attackers can systematically discover valid usernames in Django-based applications, increasing the risk of targeted credential stuffing or social engineering; the issue affects Debian-packaged Django deployments and requires prompt patching to maintain user privacy controls.

How an attack unfolds

An attacker crafts repeated login attempts against the Django authentication endpoint, comparing response latencies between known-invalid usernames and potential valid ones that have unusable passwords set, thereby building a list of enumerated accounts without triggering authentication failures.

How to fix it

Upgrade Django to version 5.0.7 or 4.2.14 or later. For Debian 12 systems apply package version 6.1.94-1 or newer; for Debian 13 systems apply package version 6.8.11-1 or newer. Restart affected services after package installation and verify no custom authentication backends override the patched behavior.

How to confirm the fix worked

Confirm installed Django version meets or exceeds the fixed releases, review authentication backend configuration for reliance on ModelBackend, and test that login timing is now consistent regardless of password usability state.

Typical attack path

  1. Identify Django login endpoint handling ModelBackend authentication
  2. Prepare lists of candidate usernames and observe baseline timing for non-existent users
  3. Submit login requests for accounts known to have unusable passwords and measure timing deltas
  4. Correlate slower or faster responses to infer valid user accounts
  5. Use enumerated usernames for subsequent attacks such as password spraying

How to detect it

Review web server and application logs for unusually high volumes of authentication requests with diverse usernames originating from single sources; look for patterns of login attempts that do not result in account lockouts or error messages.

What your security team should do

  • Apply the listed Debian package updates immediately given the public disclosure date
  • Audit all applications using django.contrib.auth for custom unusable password configurations
  • Monitor authentication endpoint logs for high volumes of login attempts with varying usernames
  • Consider rate limiting and consistent timing responses on authentication paths as defense in depth

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
PyPI django 4.2 4.2.14
PyPI django 5.0 5.0.7
Bitnami django 4.2.0 4.2.14
Chainguard py3-django 0 5.0.7-r0
Chainguard py3-supported-django 0 5.0.7-r0
Chainguard py3.10-django 0 5.0.7-r0
Chainguard py3.10-django-bin 0 5.0.7-r0
Chainguard py3.11-django 0 5.0.7-r0
Chainguard py3.11-django-bin 0 5.0.7-r0
Chainguard py3.12-django 0 5.0.7-r0
Chainguard py3.12-django-bin 0 5.0.7-r0
Chainguard py3.13-django 0 5.0.7-r0
Chainguard py3.13-django-bin 0 5.0.7-r0
Debian:11 python-django 0 No fix
Debian:12 python-django 0 No fix
Debian:13 python-django 0 3:4.2.14-1
Debian:14 python-django 0 3:4.2.14-1
Mageia:9 python-django 0 4.1.13-1.2.mga9
Red Hat:ansible_automation_platform:2.4::el8 automation-controller 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 automation-controller-cli 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 automation-controller-server 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 automation-controller-ui 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 automation-controller-venv-tower 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python39-django 0 0:4.2.15-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python39-grpcio 0 0:1.58.3-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python39-grpcio-debuginfo 0 0:1.58.3-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python39-zipp 0 0:3.19.2-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python3x-django 0 0:4.2.15-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python3x-grpcio 0 0:1.58.3-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python3x-grpcio-debugsource 0 0:1.58.3-1.el8ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller-cli 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller-server 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller-ui 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 automation-controller-venv-tower 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python-django 0 0:4.2.15-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python-grpcio 0 0:1.58.3-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python-grpcio-debugsource 0 0:1.58.3-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python-zipp 0 0:3.19.2-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python3-django 0 0:4.2.15-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python3-grpcio 0 0:1.58.3-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python3-grpcio-debuginfo 0 0:1.58.3-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python3-zipp 0 0:3.19.2-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller-cli 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller-server 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller-ui 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 automation-controller-venv-tower 0 0:4.5.10-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8 python39-zipp 0 0:3.19.2-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller-cli 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller-server 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller-ui 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 automation-controller-venv-tower 0 0:4.5.10-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 python-zipp 0 0:3.19.2-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9 python3-zipp 0 0:3.19.2-1.el9ap
Red Hat:ansible_automation_platform_inside:2.4::el8 python39-zipp 0 0:3.19.2-1.el8ap
Red Hat:ansible_automation_platform_inside:2.4::el9 python-zipp 0 0:3.19.2-1.el9ap
Red Hat:ansible_automation_platform_inside:2.4::el9 python3-zipp 0 0:3.19.2-1.el9ap
Red Hat:openstack:18.0::el9 python-django 0 0:3.2.12-8.el9ost
Red Hat:openstack:18.0::el9 python3-django 0 0:3.2.12-8.el9ost
Red Hat:satellite:6.16::el8 ansible-collection-redhat-satellite 0 0:4.2.0-1.el8sat
Red Hat:satellite:6.16::el8 ansible-collection-redhat-satellite_operations 0 0:3.0.0-1.el8sat
Red Hat:satellite:6.16::el8 ansible-lint 0 0:5.4.0-1.el8pc
Red Hat:satellite:6.16::el8 ansible-runner 0 0:2.2.1-6.el8sat
Red Hat:satellite:6.16::el8 ansiblerole-foreman_scap_client 0 0:0.3.0-1.el8sat
Red Hat:satellite:6.16::el8 ansiblerole-insights-client 0 0:1.7.1-2.el8sat
Red Hat:satellite:6.16::el8 candlepin 0 0:4.4.16-1.el8sat
Red Hat:satellite:6.16::el8 candlepin-selinux 0 0:4.4.16-1.el8sat
Red Hat:satellite:6.16::el8 cjson 0 0:1.7.17-1.el8sat
Red Hat:satellite:6.16::el8 cjson-debuginfo 0 0:1.7.17-1.el8sat
Red Hat:satellite:6.16::el8 cjson-debugsource 0 0:1.7.17-1.el8sat
Red Hat:satellite:6.16::el8 createrepo_c 0 0:1.1.3-1.el8pc
Red Hat:satellite:6.16::el8 createrepo_c-debuginfo 0 0:1.1.3-1.el8pc
Red Hat:satellite:6.16::el8 createrepo_c-debugsource 0 0:1.1.3-1.el8pc
Red Hat:satellite:6.16::el8 createrepo_c-libs 0 0:1.1.3-1.el8pc
Red Hat:satellite:6.16::el8 createrepo_c-libs-debuginfo 0 0:1.1.3-1.el8pc
Red Hat:satellite:6.16::el8 dynflow-utils 0 0:1.6.3-1.el8sat
Red Hat:satellite:6.16::el8 foreman 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-bootloaders-redhat 0 0:202102220000-3.el8sat
Red Hat:satellite:6.16::el8 foreman-bootloaders-redhat-tftpboot 0 0:202102220000-3.el8sat
Red Hat:satellite:6.16::el8 foreman-cli 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-debug 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-discovery-image 0 1:4.1.0-61.el8sat
Red Hat:satellite:6.16::el8 foreman-discovery-image-service 0 0:1.0.0-4.1.el8sat
Red Hat:satellite:6.16::el8 foreman-discovery-image-service-tui 0 0:1.0.0-4.1.el8sat
Red Hat:satellite:6.16::el8 foreman-dynflow-sidekiq 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-ec2 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-fapolicyd 0 0:1.0.1-3.el8sat
Red Hat:satellite:6.16::el8 foreman-installer 0 1:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-installer-katello 0 1:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-journald 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-libvirt 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-obsolete-packages 0 0:1.10-1.el8sat
Red Hat:satellite:6.16::el8 foreman-openstack 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-ovirt 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-pcp 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-postgresql 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-proxy 0 0:3.12.0-1.el8sat
Red Hat:satellite:6.16::el8 foreman-proxy-content 0 0:4.14.0-0.1.rc2.el8sat
Red Hat:satellite:6.16::el8 foreman-proxy-fapolicyd 0 0:1.0.1-3.el8sat
Red Hat:satellite:6.16::el8 foreman-proxy-journald 0 0:3.12.0-1.el8sat
Red Hat:satellite:6.16::el8 foreman-redis 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-selinux 0 0:3.12.0-1.el8sat
Red Hat:satellite:6.16::el8 foreman-service 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-telemetry 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 foreman-vmware 0 0:3.12.0.1-1.el8sat
Red Hat:satellite:6.16::el8 katello 0 0:4.14.0-0.1.rc2.el8sat
Red Hat:satellite:6.16::el8 katello-certs-tools 0 0:2.10.0-1.el8sat
Red Hat:satellite:6.16::el8 katello-client-bootstrap 0 0:1.7.9-1.el8sat
Red Hat:satellite:6.16::el8 katello-common 0 0:4.14.0-0.1.rc2.el8sat
Red Hat:satellite:6.16::el8 katello-debug 0 0:4.14.0-0.1.rc2.el8sat
Red Hat:satellite:6.16::el8 katello-selinux 0 0:5.0.2-1.el8sat
Red Hat:satellite:6.16::el8 libcomps 0 0:0.1.21-1.el8pc
Red Hat:satellite:6.16::el8 libcomps-debuginfo 0 0:0.1.21-1.el8pc
Red Hat:satellite:6.16::el8 libcomps-debugsource 0 0:0.1.21-1.el8pc
Red Hat:satellite:6.16::el8 libsodium 0 0:1.0.17-3.el8sat
Red Hat:satellite:6.16::el8 libsodium-debuginfo 0 0:1.0.17-3.el8sat
Red Hat:satellite:6.16::el8 libsodium-debugsource 0 0:1.0.17-3.el8sat
Red Hat:satellite:6.16::el8 libsolv 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 libsolv-debuginfo 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 libsolv-debugsource 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 libsolv-demo-debuginfo 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 libsolv-tools-debuginfo 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 mosquitto 0 0:2.0.19-1.el8sat
Red Hat:satellite:6.16::el8 mosquitto-debuginfo 0 0:2.0.19-1.el8sat
Red Hat:satellite:6.16::el8 mosquitto-debugsource 0 0:2.0.19-1.el8sat
Red Hat:satellite:6.16::el8 perl-solv-debuginfo 0 1:0.7.20-6.el8sat
Red Hat:satellite:6.16::el8 postgresql-evr 0 0:0.0.2-3.el8sat
Red Hat:satellite:6.16::el8 pulpcore-obsolete-packages 0 0:1.2.0-1.el8pc
Red Hat:satellite:6.16::el8 pulpcore-selinux 0 0:2.0.1-1.el8pc
Red Hat:satellite:6.16::el8 puppet-agent 0 0:8.8.1-1.el8sat
Red Hat:satellite:6.16::el8 puppet-agent-oauth 0 0:0.5.10-1.el8sat
Red Hat:satellite:6.16::el8 puppet-foreman_scap_client 0 0:1.0.0-2.el8sat
Red Hat:satellite:6.16::el8 puppetlabs-stdlib 0 0:9.4.1-1.el8sat
Red Hat:satellite:6.16::el8 puppetserver 0 0:8.6.2-2.el8sat
Red Hat:satellite:6.16::el8 python-aiodns 0 0:3.0.0-7.el8pc
Red Hat:satellite:6.16::el8 python-aiofiles 0 0:22.1.0-5.el8pc
Red Hat:satellite:6.16::el8 python-aiohttp 0 0:3.9.4-1.el8pc
Red Hat:satellite:6.16::el8 python-aiohttp-debugsource 0 0:3.9.4-1.el8pc
Red Hat:satellite:6.16::el8 python-aiohttp-xmlrpc 0 0:1.5.0-6.el8pc
Red Hat:satellite:6.16::el8 python-aioredis 0 0:2.0.1-6.el8pc
Red Hat:satellite:6.16::el8 python-aiosignal 0 0:1.3.1-5.el8pc
Red Hat:satellite:6.16::el8 python-ansible-builder 0 0:3.0.0-1.el8pc
Red Hat:satellite:6.16::el8 python-asgiref 0 0:3.6.0-5.el8pc
Red Hat:satellite:6.16::el8 python-async-lru 0 0:1.0.3-5.el8pc
Red Hat:satellite:6.16::el8 python-async-timeout 0 0:4.0.2-6.el8pc
Red Hat:satellite:6.16::el8 python-asyncio-throttle 0 0:1.0.2-7.el8pc
Red Hat:satellite:6.16::el8 python-attrs 0 0:21.4.0-6.el8pc
Red Hat:satellite:6.16::el8 python-backoff 0 0:2.2.1-5.el8pc
Red Hat:satellite:6.16::el8 python-bindep 0 0:2.11.0-5.el8pc
Red Hat:satellite:6.16::el8 python-bleach 0 0:3.3.1-6.el8pc
Red Hat:satellite:6.16::el8 python-bleach-allowlist 0 0:1.0.3-7.el8pc
Red Hat:satellite:6.16::el8 python-bracex 0 0:2.2.1-6.el8pc
Red Hat:satellite:6.16::el8 python-brotli 0 0:1.0.9-6.el8pc
Red Hat:satellite:6.16::el8 python-brotli-debugsource 0 0:1.0.9-6.el8pc
Red Hat:satellite:6.16::el8 python-certifi 0 0:2022.12.7-5.el8pc
Red Hat:satellite:6.16::el8 python-cffi 0 0:1.15.1-5.el8pc
Red Hat:satellite:6.16::el8 python-cffi-debugsource 0 0:1.15.1-5.el8pc
Red Hat:satellite:6.16::el8 python-chardet 0 0:5.0.0-2.el8pc
Red Hat:satellite:6.16::el8 python-charset-normalizer 0 0:2.1.1-5.el8pc
Red Hat:satellite:6.16::el8 python-click 0 0:8.1.3-5.el8pc
Red Hat:satellite:6.16::el8 python-click-shell 0 0:2.1-7.el8pc
Red Hat:satellite:6.16::el8 python-colorama 0 0:0.4.4-7.el8pc
Red Hat:satellite:6.16::el8 python-commonmark 0 0:0.9.1-9.el8pc
Red Hat:satellite:6.16::el8 python-contextlib2 0 0:21.6.0-7.el8pc
Red Hat:satellite:6.16::el8 python-cryptography 0 0:42.0.8-1.el8pc
Red Hat:satellite:6.16::el8 python-cryptography-debugsource 0 0:42.0.8-1.el8pc
Red Hat:satellite:6.16::el8 python-daemon 0 0:2.3.1-3.el8sat
Red Hat:satellite:6.16::el8 python-dataclasses 0 0:0.8-7.el8pc
Red Hat:satellite:6.16::el8 python-dateutil 0 0:2.8.2-5.el8pc
Red Hat:satellite:6.16::el8 python-debian 0 0:0.1.44-7.el8pc
Red Hat:satellite:6.16::el8 python-defusedxml 0 0:0.7.1-7.el8pc
Red Hat:satellite:6.16::el8 python-deprecated 0 0:1.2.13-5.el8pc
Red Hat:satellite:6.16::el8 python-diff-match-patch 0 0:20200713-7.el8pc
Red Hat:satellite:6.16::el8 python-distro 0 0:1.7.0-4.el8pc
Red Hat:satellite:6.16::el8 python-django 0 0:4.2.16-1.el8pc
Red Hat:satellite:6.16::el8 python-django-filter 0 0:23.2-4.el8pc
Red Hat:satellite:6.16::el8 python-django-guid 0 0:3.3.0-5.el8pc
Red Hat:satellite:6.16::el8 python-django-import-export 0 0:3.1.0-4.el8pc
Red Hat:satellite:6.16::el8 python-django-lifecycle 0 0:1.0.0-4.el8pc
Red Hat:satellite:6.16::el8 python-django-readonly-field 0 0:1.1.2-4.el8pc
Red Hat:satellite:6.16::el8 python-djangorestframework 0 0:3.14.0-4.el8pc
Red Hat:satellite:6.16::el8 python-djangorestframework-queryfields 0 0:1.0.0-8.el8pc
Red Hat:satellite:6.16::el8 python-docutils 0 0:0.20.1-4.el8pc
Red Hat:satellite:6.16::el8 python-drf-access-policy 0 0:1.3.0-4.el8pc
Red Hat:satellite:6.16::el8 python-drf-nested-routers 0 0:0.93.4-6.el8pc
Red Hat:satellite:6.16::el8 python-drf-spectacular 0 0:0.26.5-5.el8pc
Red Hat:satellite:6.16::el8 python-dynaconf 0 0:3.1.12-4.el8pc
Red Hat:satellite:6.16::el8 python-ecdsa 0 0:0.18.0-5.el8pc
Red Hat:satellite:6.16::el8 python-enrich 0 0:1.2.6-7.el8pc
Red Hat:satellite:6.16::el8 python-et-xmlfile 0 0:1.1.0-6.el8pc
Red Hat:satellite:6.16::el8 python-flake8 0 0:5.0.0-3.el8pc
Red Hat:satellite:6.16::el8 python-frozenlist 0 0:1.3.3-5.el8pc
Red Hat:satellite:6.16::el8 python-frozenlist-debugsource 0 0:1.3.3-5.el8pc
Red Hat:satellite:6.16::el8 python-future 0 0:0.18.3-5.el8pc
Red Hat:satellite:6.16::el8 python-galaxy-importer 0 0:0.4.19-2.el8pc
Red Hat:satellite:6.16::el8 python-gitdb 0 0:4.0.10-5.el8pc
Red Hat:satellite:6.16::el8 python-gitpython 0 0:3.1.40-3.el8pc
Red Hat:satellite:6.16::el8 python-gnupg 0 0:0.5.0-4.el8pc

Related vulnerabilities