Key Collision Vulnerability in Python-Django: CVE-2020-13254

python-django Updated 03 Oct 2025

Summary

03/06/2020
N/A
Yes i
Medium
5.9

UBUNTU-CVE-2020-13254: An issue was discovered in Django 2.2 before 2.2.13 and 3.0 before 3.0.7. Affects python-django versions < 1.6.11-0ubuntu1.3+esm1. Fixed in 1.6.11-0ubuntu1.3+esm1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python-Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It is widely used for building web applications and provides a robust set of features, including an ORM, URL routing, and templating. The vulnerability CVE-2020-13254 affects various versions of Python-Django, specifically those using a memcached backend that does not validate cache keys, leading to potential data leakage.

Vulnerability Detail

An issue was discovered in Django versions 2.2 before 2.2.13 and 3.0 before 3.0.7. The vulnerability arises when a memcached backend fails to perform key validation, allowing attackers to pass malformed cache keys. This can result in key collisions, leading to unintended data exposure and potential data leakage. The severity of this vulnerability is reflected in its CVSS score of 5.9, indicating a medium risk to affected systems.

How To Fix

Minimum fixed version

1.6.11-0ubuntu1.3+esm1

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

As a temporary measure, consider disabling the use of the memcached backend until the package can be updated. This can be done by modifying the Django settings to use a different caching backend that performs key validation.

Conclusion

CVE-2020-13254 is a significant vulnerability in Python-Django that can lead to data leakage due to improper key validation in memcached backends. It is crucial for users to update their packages to the patched versions to mitigate this risk. Temporary workarounds are available, but updating is the best long-term solution.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

CVE-2020-13254 is a vulnerability in Python-Django that allows for key collisions in memcached backends, potentially leading to data leakage.

The vulnerability affects Django versions 2.2 before 2.2.13 and 3.0 before 3.0.7, as well as various versions in Ubuntu distributions.

You can use Vulert, which monitors open-source vulnerabilities in your software using a manifest file. Check your application against the vulnerability using the Vulert playground at Vulert Scanner.

If immediate updates are not possible, consider disabling the memcached backend or switching to a different caching mechanism that validates keys.

The CVSS score of CVE-2020-13254 is 5.9, indicating a medium level of risk.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

Minimum fixed version

1.6.11-0ubuntu1.3+esm1

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