Denial of Service Vulnerability in Django Session Middleware

python-django Updated 02 Oct 2025

Summary

24/08/2015
N/A
Yes i
Unrated
Not published

CVE-2015-5963: 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 consum... Affects python-django versions < 1.7.10-1. Fixed in 1.7.10-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It provides a robust set of features for building web applications, including an authentication system, URL routing, and a powerful ORM. The SessionMiddleware component manages user sessions, allowing developers to store and retrieve user data across requests. However, certain versions of Django are vulnerable to a denial of service attack due to improper handling of session records, which can be exploited by sending numerous requests to the logout view.

Vulnerability Detail

The vulnerability, identified as CVE-2015-5963, affects Django versions 1.8.x before 1.8.4, 1.7.x before 1.7.10, and 1.4.x before 1.4.22. It allows remote attackers to consume session store resources or remove session records by triggering the creation of empty session records through repeated requests to the contrib.auth.views.logout endpoint. This can lead to denial of service, impacting the availability of the application.

How To Fix

Minimum fixed version

1.7.10-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot upgrade immediately, consider implementing rate limiting on the logout endpoint to mitigate the risk of denial of service attacks. This can be done using middleware or a third-party package that restricts the number of requests from a single IP address within a specified timeframe.

Conclusion

CVE-2015-5963 is a significant vulnerability in certain versions of Django that can lead to denial of service through session record manipulation. It is crucial for developers to upgrade to the latest versions of Django to mitigate this risk. Additionally, implementing rate limiting can serve as a temporary measure while preparing for an upgrade.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

CVE-2015-5963 is a vulnerability in Django that allows attackers to cause denial of service by exploiting the session middleware.

Django versions 1.8.x before 1.8.4, 1.7.x before 1.7.10, and 1.4.x before 1.4.22 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to denial of service, making your application unavailable to legitimate users.

Implement rate limiting on the logout endpoint as a temporary workaround to reduce the risk of denial of service attacks.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

1.7.10-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-django

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback