Advisory

PYSEC-2022-213

Also known as: BIT-django-2022-34265, CVE-2022-34265, GHSA-p64x-8rxx-wf6q

Summary

The record has no summary.

Details

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected.

Severity

Not rated by the source.

Dates

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

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 3.2, fixed 3.2.14, introduced 4.0, fixed 4.0.6 (ecosystem)

Fixed versions

3.2.14, 4.0.6

Fix

  • Fixed version 3.2.14
    pip install --upgrade django==3.2.14
  • Fixed version 4.0.6
    pip install --upgrade django==4.0.6

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