CVE-2021-44420: Django - Bypass of Upstream Access Control

django Updated 02 Oct 2025

Summary

08/12/2021
Yes i
Moderate
7.3

CVE-2021-44420: In Django 2.2 before 2.2.25, 3.1 before 3.1.14, and 3.2 before 3.2.10, HTTP requests for URLs with trailing newlines could bypass upstream access control based on URL paths. Affects django across 3 version ranges.

>= 2.2, < 2.2.25 >= 3.1, < 3.1.14 >= 3.2, < 3.2.10

Fixed in 2.2.25, 3.1.14 or 3.2.10, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2021-44420 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Django is a popular Python web framework that simplifies the development of web applications. It provides a robust set of tools and features for building secure and scalable websites. However, versions 2.2 before 2.2.25, 3.1 before 3.1.14, and 3.2 before 3.2.10 of Django are vulnerable to a security issue that allows HTTP requests for URLs with trailing newlines to bypass upstream access control based on URL paths.

Vulnerability Detail

The vulnerability in Django allows attackers to bypass access control restrictions by appending newlines to the URLs. This can lead to unauthorized access to sensitive resources or actions that should be restricted. By exploiting this vulnerability, an attacker could perform actions that are otherwise restricted, potentially compromising the security and integrity of the application. It is important to note that this vulnerability only affects Django versions 2.2 to 2.2.24, 3.1 to 3.1.13, and 3.2 to 3.2.9.

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.

  • >= 2.2, < 2.2.25 2.2.25
    pip install --upgrade "django==2.2.25"
  • >= 3.1, < 3.1.14 3.1.14
    pip install --upgrade "django==3.1.14"
  • >= 3.2, < 3.2.10 3.2.10
    pip install --upgrade "django==3.2.10"

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

Workaround

There is no known workaround for this vulnerability. It is necessary to upgrade Django to the patched versions mentioned above to address the issue.

Conclusion

In conclusion, the CVE-2021-44420 vulnerability in Django allows for the bypass of upstream access control based on URL paths. Upgrading to the patched versions of Django is crucial to mitigate the risk of unauthorized access and ensure the security of your web application. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for django →

Share this vulnerability

FAQ

The vulnerability allows attackers to bypass access control restrictions, potentially leading to unauthorized access to sensitive resources or actions.

Django versions 2.2 to 2.2.24, 3.1 to 3.1.13, and 3.2 to 3.2.9 are affected by this vulnerability.

No, there is no known workaround for this vulnerability. Upgrading to the patched versions is the recommended solution.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. No signup is required, and you can simply input your Pipfile.lock to get real-time alerts for open-source vulnerabilities.

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.

  • >= 2.2, < 2.2.25 2.2.25
    pip install --upgrade "django==2.2.25"
  • >= 3.1, < 3.1.14 3.1.14
    pip install --upgrade "django==3.1.14"
  • >= 3.2, < 3.2.10 3.2.10
    pip install --upgrade "django==3.2.10"

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