Intel

AIKIDO-2025-10624

django is vulnerable to SQL Injection

SQL InjectionCVE-2025-57833 Published Sep 9, 2025

71

High Risk

This Affects:

pythondjango
4.2.0 - 4.2.23
Fixed in 4.2.24
5.1.0 - 5.1.11
Fixed in 5.1.12
5.2.0 - 5.2.5
Fixed in 5.2.6
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to SQL injection in the FilteredRelation class when handling specially crafted dictionaries expanded as **kwargs in QuerySet.annotate or QuerySet.alias. An attacker could exploit this by supplying malicious input that is directly incorporated into SQL queries, allowing arbitrary SQL command execution.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

django is vulnerable to SQL Injection in versions 4.2.0 - 4.2.23, 5.1.0 - 5.1.11 and 5.2.0 - 5.2.5.

How to fix this

Upgrade the django library to the patch version.