An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed QuerySet.annotate() or QuerySet.alias().
{
"unresolved_ranges": [
{
"source": "AFFECTED_FIELD",
"extracted_events": [
{
"introduced": "4.2"
},
{
"fixed": "4.2.24"
},
{
"introduced": "5.1"
},
{
"fixed": "5.1.12"
},
{
"introduced": "5.2"
},
{
"fixed": "5.2.6"
}
]
},
{
"source": "CPE_FIELD",
"extracted_events": [
{
"introduced": "4.2"
},
{
"fixed": "4.2.24"
},
{
"introduced": "5.1"
},
{
"fixed": "5.1.12"
},
{
"introduced": "5.2"
},
{
"fixed": "5.2.6"
}
]
},
{
"source": "DESCRIPTION",
"extracted_events": [
{
"introduced": "4.2"
},
{
"fixed": "4.2.24"
},
{
"introduced": "5.1"
},
{
"fixed": "5.1.12"
},
{
"introduced": "5.2"
},
{
"fixed": "5.2.6"
}
]
}
],
"cwe_ids": [
"CWE-89"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/57xxx/CVE-2025-57833.json",
"cna_assigner": "mitre"
}