Advisory

PYSEC-2020-35

Also known as: BIT-django-2020-7471, CVE-2020-7471, GHSA-hmr4-m2h5-33qx

Summary

The record has no summary.

Details

Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). By passing a suitably crafted delimiter to a contrib.postgres.aggregates.StringAgg instance, it was possible to break escaping and inject malicious SQL.

Severity

Not rated by the source.

Dates

Published
2020-02-03 12:15 UTC
Modified
2023-12-06 01:00 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 1.11, fixed 1.11.28, introduced 2.2, fixed 2.2.10, introduced 3.0, fixed 3.0.3 (ecosystem)

Fixed versions

1.11.28, 2.2.10, 3.0.3

Fix

  • Fixed version 1.11.28
    pip install --upgrade django==1.11.28
  • Fixed version 2.2.10
    pip install --upgrade django==2.2.10
  • Fixed version 3.0.3
    pip install --upgrade django==3.0.3

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