Advisory

GHSA-hmr4-m2h5-33qx

Also known as: BIT-django-2020-7471, CVE-2020-7471, PYSEC-2020-35

Summary

SQL injection in Django

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

Critical Basis: The source's own band: CRITICAL

Dates

Published
2020-02-11 21:03 UTC
Modified
2025-02-21 06:12 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 0, fixed 1.11.28 (ecosystem)

Fixed versions

1.11.28

Fix

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

django

PyPI · All systems

Affected

  • introduced 2.0, fixed 2.2.10 (ecosystem)

Fixed versions

2.2.10

Fix

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

django

PyPI · All systems

Affected

  • introduced 3.0, fixed 3.0.3 (ecosystem)

Fixed versions

3.0.3

Fix

  • 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: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences