CVE-2021-30459: SQL Injection via django-debug-toolbar

django-debug-toolbar Updated 02 Oct 2025

Summary

16/04/2021
Yes i
High
9.8

CVE-2021-30459: SQL Injection via in django-debug-toolbar. Affects django-debug-toolbar across 3 version ranges.

>= 0.10.0, < 1.11.1 >= 2.0a1, < 2.2.1 >= 3.0a1, < 3.2.1

Fixed in 1.11.1, 2.2.1 or 3.2.1, 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 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

Django Debug Toolbar is a popular debugging tool for Django web applications. It provides various panels that display information about the current request/response, database queries, and more. However, a vulnerability has been discovered in django-debug-toolbar that allows attackers to execute SQL injection attacks by manipulating the raw_sql input of the SQL explain, analyze, or select forms.

Vulnerability Detail

The vulnerability in django-debug-toolbar allows attackers to execute arbitrary SQL queries by modifying the raw_sql input and submitting the form. This can lead to unauthorized access to sensitive data, data manipulation, or even remote code execution. It is important to note that this vulnerability is considered high severity, especially if the toolbar is used in a production environment.

How To Fix

Fixed versions by release line

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

  • >= 0.10.0, < 1.11.1 1.11.1
    pip install --upgrade "django-debug-toolbar==1.11.1"
  • >= 2.0a1, < 2.2.1 2.2.1
    pip install --upgrade "django-debug-toolbar==2.2.1"
  • >= 3.0a1, < 3.2.1 3.2.1
    pip install --upgrade "django-debug-toolbar==3.2.1"

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 specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to the patched versions of django-debug-toolbar.

Conclusion

The SQL injection vulnerability in django-debug-toolbar can be addressed by upgrading to the patched versions. It is important to take immediate action to protect your application from potential attacks. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for django-debug-toolbar →

Share this vulnerability

FAQ

Django Debug Toolbar is a debugging tool for Django web applications. It provides various panels to display information about the current request/response, database queries, and more.

The SQL injection vulnerability occurs due to improper handling of user-supplied input in the raw_sql input of the SQL explain, analyze, or select forms in django-debug-toolbar.

With this vulnerability, an attacker can execute arbitrary SQL queries, potentially leading to unauthorized access to sensitive data, data manipulation, or even remote code execution.

Yes, this vulnerability is considered high severity, especially if django-debug-toolbar is used in a production environment.

To fix this vulnerability, it is recommended to upgrade to the latest patched versions of django-debug-toolbar, depending on the major version you are using.

How To Fix

Fixed versions by release line

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

  • >= 0.10.0, < 1.11.1 1.11.1
    pip install --upgrade "django-debug-toolbar==1.11.1"
  • >= 2.0a1, < 2.2.1 2.2.1
    pip install --upgrade "django-debug-toolbar==2.2.1"
  • >= 3.0a1, < 3.2.1 3.2.1
    pip install --upgrade "django-debug-toolbar==3.2.1"

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