CVE-2011-0698: Directory Traversal Vulnerability in Django

django Updated 02 Oct 2025

Summary

23/07/2018
Yes i
Critical
9.1

CVE-2011-0698: Directory traversal in Django. Affects django across 2 version ranges.

>= 1.1, < 1.1.4 >= 1.2, < 1.2.5

Fixed in 1.1.4 or 1.2.5, depending on the release line you run. 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 popular Python web framework used for building web applications. It provides a high-level, efficient, and secure way to handle web development tasks. This vulnerability affects Django versions 1.1.x before 1.1.4 and 1.2.x before 1.2.5 on Windows. Django on Windows is susceptible to a directory traversal vulnerability, which can be exploited by remote attackers. The vulnerability arises from a session cookie that contains a key with a / (slash) character. This vulnerability can lead to unauthorized access to sensitive files or even remote code execution.

Vulnerability Detail

The directory traversal vulnerability in Django allows remote attackers to read or execute files by exploiting a / (slash) character in a key within a session cookie. This vulnerability can be abused to replay sessions and gain unauthorized access to sensitive files on the server. The impact of this vulnerability can be severe, as it can lead to unauthorized disclosure of sensitive information or even remote code execution.

How To Fix

Latest published version: 6.1.2 as of 22 Oct 2026

pip install --upgrade "django==6.1.2"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.1, < 1.1.4 1.1.4
    pip install --upgrade "django==1.1.4"
  • >= 1.2, < 1.2.5 1.2.5
    pip install --upgrade "django==1.2.5"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading Django is not immediately feasible, a temporary workaround is to manually sanitize the session cookies by removing any / (slash) characters from the keys. This can be done by modifying the session middleware or implementing a custom session backend. Here is an example of how to sanitize the session cookies in Django:

from django.http import HttpRequest

def sanitize_session_cookie(request: HttpRequest):
    session_key = request.COOKIES.get('sessionid', '')
    sanitized_key = session_key.replace('/', '')
    request.COOKIES['sessionid'] = sanitized_key

By implementing this workaround, the vulnerability can be mitigated until a proper upgrade to a patched version of Django can be performed.

Conclusion

The directory traversal vulnerability in Django can have severe consequences, including unauthorized access to sensitive files and potential remote code execution. It is crucial to upgrade to the patched versions of Django (1.1.4 or later for Django 1.1.x, and 1.2.5 or later for Django 1.2.x) to mitigate this vulnerability. If immediate upgrade is not possible, implementing the provided workaround can help temporarily safeguard the application. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for django →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to read or execute files on the server, potentially leading to unauthorized access to sensitive information or remote code execution.

Django versions 1.1.x before 1.1.4 and 1.2.x before 1.2.5 on Windows are affected by this vulnerability.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your Pipfile.lock and the playground will analyze it for any open-source vulnerabilities, including this one.

Yes, Django has released patches for this vulnerability. It is recommended to upgrade to Django version 1.1.4 or later if using Django 1.1.x, or to version 1.2.5 or later if using Django 1.2.x.

While specific exploits for this vulnerability may exist, they have not been disclosed publicly. However, it is crucial to patch the vulnerability as soon as possible to prevent any potential exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for django.

How To Fix

Latest published version: 6.1.2 as of 22 Oct 2026

pip install --upgrade "django==6.1.2"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.1, < 1.1.4 1.1.4
    pip install --upgrade "django==1.1.4"
  • >= 1.2, < 1.2.5 1.2.5
    pip install --upgrade "django==1.2.5"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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