CVE-2015-5963
NoneCVSS
—
EPSS
5.2%
Published
Aug 24, 2015
CISA due date
—
Cloudanix analysis
An attacker can repeatedly call a website’s logout page to overload its session storage and make the site slow or unavailable.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Web Framework
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw is a network-reachable denial-of-service condition in Django's session handling. In affected Django releases, repeated unauthenticated requests to the built-in logout view can cause creation of empty session records even when no meaningful authenticated session exists. An attacker can automate large volumes of logout requests to consume backing session-store capacity, increase database/cache/storage load, or trigger removal/turnover of legitimate session records depending on the session backend and application behavior. The impact is availability degradation rather than code execution or data disclosure.
Why it matters to the business
Successful exploitation can make Django-backed applications slow, unstable, or unavailable by exhausting session storage or overloading the session backend. This may disrupt user logins, terminate active sessions, increase infrastructure costs, and cause operational incidents for public-facing services. The issue is old and not listed in CISA KEV, and no mature public exploit is indicated in the provided data, but it is remotely reachable, low-complexity, unauthenticated, and has a non-trivial EPSS score, so internet-exposed legacy Django deployments should still be remediated.
How an attack unfolds
An attacker identifies an application running an affected Django version that exposes a logout route backed by django.contrib.auth.views.logout and uses contrib.sessions.middleware.SessionMiddleware. The attacker then sends a high volume of HTTP requests to that logout endpoint, often from scripts, botnets, proxies, or rotating IP addresses. Each request can trigger creation of an empty session entry rather than simply returning without session persistence. Over time, the session backend accumulates unnecessary records or experiences churn, resulting in storage growth, database/cache pressure, lock contention, cleanup overhead, or removal of useful session records. The application may then exhibit slow responses, login failures, session instability, elevated error rates, or full service degradation.
How to fix it
Upgrade Django to a fixed release: Django 1.8.x should be upgraded to 1.8.4 or later, Django 1.7.x to 1.7.10 or later, and Django 1.4.x to 1.4.22 or later. Prefer upgrading to a currently supported Django long-term-support release because the affected branches are obsolete. For operating-system packaged deployments, apply the relevant Canonical Ubuntu, Oracle Solaris, or vendor package updates. If immediate upgrade is not possible, apply compensating controls: rate-limit unauthenticated requests to logout endpoints, require appropriate HTTP methods and CSRF protections where applicable, block abusive IPs or user agents at the edge, tune session cleanup jobs, monitor session backend capacity, and consider moving session storage to a backend with quotas and operational safeguards. These mitigations reduce exposure but should not replace patching.
How to confirm the fix worked
Confirm the installed Django version is not in the affected range and is at or above the fixed version for its branch. Validate through package managers, dependency manifests, virtual environments, container images, and runtime checks such as importing Django and printing django.get_version(). Review application routing to identify logout views that use the affected Django auth logout implementation. In a non-production test environment, send repeated unauthenticated requests to logout endpoints and verify that empty sessions are not created and session-store growth does not occur. Also verify that edge rate limits and WAF/API gateway controls apply to logout routes and that session cleanup/expiry tasks are operating normally.
Typical attack path
- Discover a public Django application and identify likely logout URLs such as /logout/ or /accounts/logout/.
- Confirm the endpoint is reachable without authentication or with trivial session state.
- Send automated, repeated HTTP GET or POST requests to the logout endpoint at high volume.
- Force the application to create many empty session records through the vulnerable session middleware/logout interaction.
- Exhaust or overload the configured session backend, such as database, cache, or file-based session storage.
- Cause degraded performance, failed logins, unstable user sessions, or application unavailability.
How to detect it
To determine whether this was already exploited, review web server, reverse proxy, CDN, WAF, and application access logs for unusual spikes of requests to logout endpoints, particularly unauthenticated requests, requests without prior navigation, requests lacking normal referrers, or high request rates from a small set of IPs, autonomous systems, proxies, cloud hosts, or repetitive user agents. Correlate these spikes with session backend telemetry, including sudden growth in stored sessions, increased session write operations, cleanup job duration, database/cache latency, storage utilization, lock waits, eviction events, and application 5xx errors. Application logs may show increased activity around Django auth logout handling or session creation during periods without corresponding user activity. Forensic review should focus on time windows where logout request volume, session-store growth, and application degradation align. Because this vulnerability does not provide code execution, durable host-level IOCs are not expected; detection is primarily behavioral and log-volume based.
- django.contrib.auth.views.logout
- django.contrib.sessions.middleware.SessionMiddleware
- GET /logout
- POST /logout
- GET /logout/
- POST /logout/
- GET /accounts/logout
- POST /accounts/logout
- GET /accounts/logout/
- POST /accounts/logout/
- django/contrib/sessions/middleware.py
- django/contrib/auth/views.py
What your security team should do
- Inventory all applications and containers running Django, especially legacy 1.4.x, 1.7.x, and 1.8.x deployments exposed to the internet.
- Upgrade affected Django installations to fixed versions or, preferably, to a supported Django LTS release.
- Prioritize public-facing applications with database-backed, file-backed, or capacity-constrained session storage.
- Add or verify rate limiting for logout endpoints and other unauthenticated session-touching routes.
- Monitor session backend size, write rate, cleanup failures, response latency, and HTTP 5xx/429 rates for signs of abuse.
- Search historical web access logs for high-volume unauthenticated requests to logout paths from single IPs, distributed IP ranges, or unusual user agents.
- Ensure incident runbooks include session-store exhaustion scenarios and safe cleanup procedures for empty or stale session artifacts.
- If using vendor-packaged Django on Ubuntu or Solaris, verify that the appropriate OS security update has been applied rather than relying only on application dependency files.
The record
contrib.sessions.middleware.SessionMiddleware in Django 1.8.x before 1.8.4, 1.7.x before 1.7.10, 1.4.x before 1.4.22, and possibly other versions allows remote attackers to cause a denial of service (session store consumption or session record removal) via a large number of requests to contrib.auth.views.logout, which triggers the creation of an empty session record.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | django | 1.4 | 1.4.22 |
| PyPI | django | 1.7 | 1.7.10 |
| PyPI | django | 1.8 | 1.8.4 |
| Debian:11 | python-django | 0 | 1.7.10-1 |
| Debian:12 | python-django | 0 | 1.7.10-1 |
| Debian:13 | python-django | 0 | 1.7.10-1 |
| Debian:6.0 | python-django | 0 | 1.2.3-3+squeeze14 |
| Debian:7 | python-django | 0 | 1.4.5-1+deb7u13 |
| Debian:8 | python-django | 0 | 1.7.7-1+deb8u2 |
| Mageia:4 | python-django14 | 0 | 1.4.22-1.mga4 |
| Mageia:5 | python-django | 0 | 1.8.4-1.mga5 |
| Red Hat:openstack:5::el6 | python-django | 0 | 0:1.6.11-3.el6ost |
| Red Hat:openstack:5::el6 | python-django-bash-completion | 0 | 0:1.6.11-3.el6ost |
| Red Hat:openstack:5::el6 | python-django-doc | 0 | 0:1.6.11-3.el6ost |
| Red Hat:openstack:5::el7 | python-django | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:5::el7 | python-django-bash-completion | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:5::el7 | python-django-doc | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:6::el7 | python-django | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:6::el7 | python-django-bash-completion | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:6::el7 | python-django-doc | 0 | 0:1.6.11-3.el7ost |
| Red Hat:openstack:7::el7 | python-django | 0 | 0:1.8.4-1.el7 |
| Red Hat:openstack:7::el7 | python-django-bash-completion | 0 | 0:1.8.4-1.el7 |
| Red Hat:openstack:7::el7 | python-django-doc | 0 | 0:1.8.4-1.el7 |
| SUSE:Enterprise Storage 1.0 | python-Django | 0 | 1.6.11-8.1 |
| SUSE:Enterprise Storage 2 | python-Django | 0 | 1.6.11-3.1 |
| SUSE:OpenStack Cloud 5 | python-Django | 0 | 1.6.11-10.2 |
| SUSE:Package Hub 12 SP1 | python-Django | 0 | 1.11.15-2.1 |
| Ubuntu:14.04:LTS | python-django | 0 | 1.6.1-2ubuntu0.10 |
| openSUSE:Tumbleweed | python-Django | 0 | 1.9.12-1.1 |
| openSUSE:Tumbleweed | python-Django | 0 | 3.2.7-2.3 |
| openSUSE:Tumbleweed | python-Django | 0 | 4.2.11-2.1 |
| openSUSE:Tumbleweed | python-Django4 | 0 | 4.2.14-1.1 |
| openSUSE:Tumbleweed | python-Django6 | 0 | 6.0-1.1 |
| pypi | Django | 1.4 | No fix |
| pypi | Django | 1.7 | No fix |
| pypi | Django | 1.8 | No fix |
Related vulnerabilities
- GHSA-8p8v-wh79-9r56 Django vulnerable to Uncontrolled Resource Consumption Also affects django
- GHSA-mjgh-79qc-68w3 Django has a Race Condition vulnerability Also affects django
- CVE-2026-25673 An issue was discovered in 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29. Also affects django
- CVE-2026-25674 An issue was discovered in 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29. Also affects django
- GHSA-6426-9fv3-65x8 Django has an SQL Injection issue Also affects django
- GHSA-gvg8-93h5-g6qq Django has an SQL Injection issue Also affects django
- GHSA-2mcm-79hx-8fxw Django has Observable Timing Discrepancy Also affects django
- GHSA-33mw-q7rj-mjwj Django has Inefficient Algorithmic Complexity Also affects django