SQL Injection Affecting django package, versions [,4.2.24)[5.0a1,5.1.12)[5.2a1,5.2.6)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (6th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-DJANGO-12485156
  • published4 Sept 2025
  • disclosed3 Sept 2025
  • creditEyal Gabay

Introduced: 3 Sep 2025

NewCVE-2025-57833  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade Django to version 4.2.24, 5.1.12, 5.2.6 or higher.

Overview

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Affected versions of this package are vulnerable to SQL Injection in the FilteredRelation class when a specially crafted dictionary is used with dictionary expansion as the **kwargs passed to QuerySet.annotate or QuerySet.alias. An attacker can execute arbitrary SQL commands by supplying malicious input to these parameters.

CVSS Base Scores

version 4.0
version 3.1