home / blog

2026-11-21 · high

CVE-2025-57833: SQL Injection Vulnerability in Django

SQL injection via FilteredRelation affecting database queries in the Django framework

CVE-2025-57833: SQL Injection Vulnerability in Django

CVE-2025-57833 is a SQL injection vulnerability discovered in versions of the Django framework. The vulnerability resides in the FilteredRelation component, which is subject to SQL injection in column aliases when a suitably crafted dictionary is used as **kwargs in QuerySet.annotate() or QuerySet.alias(). This vulnerability could allow an attacker to execute arbitrary SQL commands on the underlying database.

The vulnerability has high severity with a CVSS score of 7.1. It was officially published on September 3, 2025, in the National Vulnerability Database (NVD). There are GitHub repositories that claim to contain exploits for this vulnerability, but there are no active reports of exploits in the wild at this time.

For defense, it is crucial to promptly apply security updates for the specific version of Django in use. Administrators should also implement additional database query security controls and monitor for suspicious activity to minimize the impact of any residual attack vectors.

At a glance

What
SQL injection vulnerability in FilteredRelation
Severity
High (CVSS 7.1)
Affected versions
Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6
Fix
Update to version 4.2.24, 5.1.12 or 5.2.6
Status
Published (2025-09-03)
Action
Apply patches and update Django versions

Sources: NVD, CVE-2025-57833

← All articles