Critical Information Disclosure Vulnerability in Python-Django Package

python-django Updated 02 Oct 2025

Summary

04/01/2022
N/A
No i
High
7.5

UBUNTU-CVE-2021-45116: An issue was discovered in Django 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1. Affects python-django versions 1.5.4-1ubuntu1 – 1.6.11-0ubuntu1.3+esm7. No fix is published. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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 for developers. However, certain versions of Python-Django are vulnerable to a critical information disclosure issue due to flaws in the Django Template Language's variable resolution logic.

Vulnerability Detail

An issue was discovered in Django versions 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1. The vulnerability arises from the dictsort template filter, which can be exploited if passed a specially crafted key. This could lead to information disclosure or unintended method calls, potentially compromising the integrity of the application and exposing sensitive data.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If immediate patching is not feasible, consider disabling the use of the dictsort template filter in your Django templates until the package can be updated. This can help mitigate the risk of exploitation.

Conclusion

The vulnerability in the Python-Django package poses a significant risk due to potential information disclosure and unintended method calls. It is crucial for users to update to the patched versions as soon as possible to safeguard their applications. Utilizing tools like Vulert can help in monitoring and managing such vulnerabilities effectively.

See every vulnerability recorded for python-django →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

The affected versions include Django 2.2 before 2.2.26, 3.2 before 3.2.11, and 4.0 before 4.0.1.

You can use Vulert, which allows you to monitor and alert for open-source vulnerabilities in your software using just a manifest file like package-lock.json. You can also check your application on the Vulert playground without any signup.

Exploitation of this vulnerability could lead to information disclosure or unintended method calls, which may compromise sensitive data and application integrity.

No subscription is required to access the patched versions of the Python-Django package.

Related vulnerabilities

Recent vulnerabilities recorded for python-django.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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