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.
{
"unresolved_ranges": [
{
"source": "CPE_FIELD",
"extracted_events": [
{
"last_affected": "11.0"
}
],
"cpe": "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*"
},
{
"source": "CPE_FIELD",
"extracted_events": [
{
"last_affected": "9.0"
}
],
"cpe": "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
}
]
}{
"source": "CPE_FIELD",
"extracted_events": [
{
"introduced": "2.2"
},
{
"fixed": "2.2.28"
},
{
"introduced": "3.2"
},
{
"fixed": "3.2.13"
},
{
"introduced": "4.0"
},
{
"fixed": "4.0.4"
}
],
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*"
}