cve.bz

CVE-2025-57833 djangoproject django: SQL Injection

8.1 highExploit referenceEPSS 27%Fix available

High (8.1) in djangoproject django. EPSS 27% estimated probability of exploitation activity in the next 30 days. Fixed in django 4.2.24, 5.1.12, 5.2.6.

On this page
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().

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
27% (unchanged from 28% a week ago; 26% 30 days ago) estimated probability of exploitation activity in the next 30 days; 98th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2025-09-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-57833 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-57833?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-57833?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-57833 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
djangoproject Djangofrom 4.2 before 4.2.24
djangoproject Djangofrom 5.1 before 5.1.12
djangoproject Djangofrom 5.2 before 5.2.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6w2r-r2m5-xq5wPyPIdjango<4.2.244.2.24
GHSA-6w2r-r2m5-xq5wPyPIdjango>=5.0a1 <5.1.125.1.12
GHSA-6w2r-r2m5-xq5wPyPIdjango>=5.2a1 <5.2.65.2.6
PYSEC-2025-105PyPIdjango>=4.2 <4.2.24
>=5.1 <5.1.12
>=5.2 <5.2.6
4.2.24, 5.1.12, 5.2.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11python-django2:2.2.28-1~deb11u8DLA-4301-1
Debian12python-django3:3.2.25-0+deb12u1DEBIAN-CVE-2025-57833 DSA-6136-1
Debian13python-django3:4.2.27-0+deb13u1DEBIAN-CVE-2025-57833 DSA-6117-1
Debian14python-django3:4.2.24-1DEBIAN-CVE-2025-57833
Ubuntu22.04:LTSpython-django2:3.2.12-2ubuntu1.21UBUNTU-CVE-2025-57833 USN-7736-1
Ubuntu24.04:LTSpython-django3:4.2.11-1ubuntu1.10UBUNTU-CVE-2025-57833 USN-7736-1
UbuntuPro:20.04:LTSpython-django2:2.2.12-1ubuntu0.29+esm3UBUNTU-CVE-2025-57833 USN-7736-1
Red Hatansible_automation_platform:2.4::el8python39-django, python3x-django0:4.2.24-1.el8apRHSA-2025:16403
Red Hatansible_automation_platform:2.4::el9python-django, python3-django0:4.2.24-1.el9apRHSA-2025:16403
Red Hatansible_automation_platform:2.5::el8automation-controller-venv-tower0:4.6.20-1.el8apRHSA-2025:16487
Red Hatansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8python3.11-django0:4.2.24-1.el8apRHSA-2025:16487
Red Hatansible_automation_platform:2.5::el9automation-controller-venv-tower0:4.6.20-1.el9apRHSA-2025:16487
Red Hatansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9python3.11-django0:4.2.24-1.el9apRHSA-2025:16487
Red Hatopenstack:16.2::el8python-django20, python3-django200:2.0.13-20.el8ostRHSA-2025:17499
Red Hatopenstack:17.1::el9python-django, python3-django0:2.2.24-12.el9ostRHSA-2025:17498
Red Hatopenstack:18.0::el9python-django, python3-django0:3.2.12-9.el9ostRHSA-2025:17500
Red Hatsatellite:6.15::el8, satellite_capsule:6.15::el8cjson, cjson-debuginfo, cjson-debugsource0:1.7.18-2.el8satRHSA-2025:17614
Red Hatsatellite:6.15::el8, satellite_capsule:6.15::el8puppet-agent0:7.34.0-4.el8satRHSA-2025:17614
Red Hatsatellite:6.15::el8, satellite_capsule:6.15::el8python-django, python3.11-django0:4.2.24-0.1.el8pcRHSA-2025:17614
9 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Package Hub 15 SP6, Linux Enterprise Module for Package Hub 15 SP7python-Django4.2.11-150600.3.30.1SUSE-SU-2025:03074-1
openSUSELeap 15.6python-Django4.2.11-150600.3.30.1SUSE-SU-2025:03074-1
openSUSETumbleweedpython-Django5.2.6-1.1openSUSE-SU-2025:15527-1
openSUSETumbleweedpython-Django44.2.24-1.1openSUSE-SU-2025:15528-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0-1.1openSUSE-SU-2026:10005-1
Alpinev3.22, v3.23, v3.24py3-django4.2.24-r0ALPINE-CVE-2025-57833

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.4 for RHEL 8python3x-django-0:4.2.24-1.el8apFixed 2025-09-22RHSA-2025:16403
Red Hat Ansible Automation Platform 2.4 for RHEL 8ansible-automation-platform-24/lightspeed-rhel8:2.4.250225-18Fixed 2025-09-22RHSA-2025:16404
Red Hat Ansible Automation Platform 2.4 for RHEL 9python-django-0:4.2.24-1.el9apFixed 2025-09-22RHSA-2025:16403
Red Hat Ansible Automation Platform 2.5 for RHEL 8automation-controller-0:4.6.20-1.el8apFixed 2025-09-23RHSA-2025:16487
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.11-django-0:4.2.24-1.el8apFixed 2025-09-23RHSA-2025:16487
Red Hat Ansible Automation Platform 2.5 for RHEL 8ansible-automation-platform-25/lightspeed-rhel8:2.5.250924-1Fixed 2025-09-23RHSA-2025:16514
Red Hat Ansible Automation Platform 2.5 for RHEL 9automation-controller-0:4.6.20-1.el9apFixed 2025-09-23RHSA-2025:16487
Red Hat Ansible Automation Platform 2.5 for RHEL 9python3.11-django-0:4.2.24-1.el9apFixed 2025-09-23RHSA-2025:16487
Red Hat OpenStack Platform 16.2python-django20-0:2.0.13-20.el8ostFixed 2025-10-07RHSA-2025:17499
Red Hat OpenStack Platform 17.1 for RHEL 9python-django-0:2.2.24-12.el9ostFixed 2025-10-07RHSA-2025:17498
OpenShift Service Mesh 3openshift-service-mesh/istio-cni-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-must-gather-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-pilot-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-proxyv2-rhel9Not affected
OpenShift Service Mesh 3openshift-service-mesh/istio-rhel9-operatorNot affected
OpenShift Service Mesh 3openshift-service-mesh/istio-sail-operator-bundleNot affected
OpenShift Service Mesh 3openshift-service-mesh-tech-preview/istio-ztunnel-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/lightspeed-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/ansible-dev-tools-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-rhel8Affected
8 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-57833.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • loic-houchi/Django-faille-CVE-2025-57833_test Harbor Check: matches CVE 2 stars, created
  • Mkway/CVE-2025-57833 Harbor Check: matches CVE 2 stars, created
    We've set up an environment to test CVE-2025-57833. This environment was built using AI, so it's subject to ongoing modification.
  • Gayang2902/CVE-2025-57833 Harbor Check: matches CVE 1 star, Python, created
    CVE-2025-57833 PoC (취약한 도서 검색 서비스)
  • ianoboyle/CVE-2025-57833 Harbor Check: matches CVE 1 star, created
    Example Vulnerable application for CVE-2025–57833
  • Renatata-H/demo-cve-2025-57833 Harbor Check: matches CVE 0 stars, Python, created
    Uma aplicação vulnerável à CVE-2025-57833, e como consertá-la

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON