Advisory

PYSEC-2022-190

Also known as: BIT-django-2022-28346, CVE-2022-28346, GHSA-2gwj-7jmv-h26r

Summary

The record has no summary.

Details

An issue was discovered in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. QuerySet.annotate(), aggregate(), and extra() methods are subject to SQL injection in column aliases via a crafted dictionary (with dictionary expansion) as the passed **kwargs.

Severity

Not rated by the source.

Dates

Published
2022-04-12 05:15 UTC
Modified
2023-12-06 01:02 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 4.0, fixed 4.0.4, introduced 3.2, fixed 3.2.13, introduced 2.2, fixed 2.2.28 (ecosystem)

Fixed versions

4.0.4, 3.2.13, 2.2.28

Fix

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

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: PyPA Advisory Database · CC BY 4.0

Sources & licences