Advisory

GHSA-pghf-347x-c2gj

Also known as: CVE-2021-30459, PYSEC-2021-10

Summary

SQL Injection via in django-debug-toolbar

Details

Impact
With Django Debug Toolbar attackers are able to execute SQL by changing the raw_sql input of the SQL explain, analyze or select forms and submitting the form.

NOTE: This is a high severity issue for anyone using the toolbar in a production environment.

Generally the Django Debug Toolbar team only maintains the latest version of django-debug-toolbar, but an exception was made because of the high severity of this issue.

Patches
Please upgrade to one of the following versions, depending on the major version you're using:

For more information
If you have any questions or comments about this advisory:

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-04-16 19:53 UTC
Modified
2026-07-08 06:28 UTC

Affected packages and fixes

django-debug-toolbar

PyPI · All systems

Affected

  • introduced 0.10.0, fixed 1.11.1 (ecosystem)

Fixed versions

1.11.1

Fix

  • Fixed version 1.11.1
    pip install --upgrade django-debug-toolbar==1.11.1

django-debug-toolbar

PyPI · All systems

Affected

  • introduced 2.0a1, fixed 2.2.1 (ecosystem)

Fixed versions

2.2.1

Fix

  • Fixed version 2.2.1
    pip install --upgrade django-debug-toolbar==2.2.1

django-debug-toolbar

PyPI · All systems

Affected

  • introduced 3.0a1, fixed 3.2.1 (ecosystem)

Fixed versions

3.2.1

Fix

  • Fixed version 3.2.1
    pip install --upgrade django-debug-toolbar==3.2.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences