Advisory

GHSA-w24h-v9qh-8gxj

Also known as: BIT-django-2022-28347, CVE-2022-28347, PYSEC-2022-191

Summary

SQL Injection in Django

Details

A SQL injection issue was discovered in QuerySet.explain() in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. This occurs by passing a crafted dictionary (with dictionary expansion) as the **options argument, and placing the injection payload in an option name.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2022-04-13 00:00 UTC
Modified
2025-02-21 05:41 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 2.2, fixed 2.2.28 (ecosystem)

Fixed versions

2.2.28

Fix

  • Fixed version 2.2.28
    pip install --upgrade django==2.2.28

django

PyPI · All systems

Affected

  • introduced 3.2, fixed 3.2.13 (ecosystem)

Fixed versions

3.2.13

Fix

  • Fixed version 3.2.13
    pip install --upgrade django==3.2.13

django

PyPI · All systems

Affected

  • introduced 4.0, fixed 4.0.4 (ecosystem)

Fixed versions

4.0.4

Fix

  • Fixed version 4.0.4
    pip install --upgrade django==4.0.4

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