CVE-2022-28346

Django: SQL injection in QuerySet.annotate(),aggregate() and extra()

Published Apr 12, 2022 CVSS 3.1 · 9.8 Critical EPSS 18.7% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2982-1 python-django security update
Debian DSA Debian DSA DSA-5254-1 python-django security update
EUVD EUVD EUVD-2022-0087 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.
Github GHSA Github GHSA GHSA-2gwj-7jmv-h26r SQL Injection in Django
Ubuntu USN Ubuntu USN USN-5373-1 Django vulnerabilities
Ubuntu USN Ubuntu USN USN-5373-2 Django vulnerabilities
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Feb 13, 2025, 4:32 PM
Reserved
Apr 2, 2022, 12:00 AM
Status
Modified
Published
Apr 12, 2022, 5:15 AM
Modified
Jun 17, 2026, 4:38 AM
Severity
Important
Public date
Apr 11, 2022, 8:00 AM