Read the docs
TI-2025-35707 Aliases CVE-2025-57833GHSA-6w2r-r2m5-xq5w

SQL injection in djangoproject Django

Priority HIGH 70CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 11 fixed, 3 without a fix

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-89.

Summary

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().

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.28271 98th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial Django (djangoproject): 4.2.24, 5.1.12, 5.2.6Django (PyPI): 4.2.24, 5.1.12, 5.2.6Red Hat: 10 advisoriesRed Hat: 11 fixed, 3 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
djangoprojectDjango4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.64.2.24, 5.1.12, 5.2.6Patch availableCNA
—Django (PyPI)before 4.2.244.2.24Patch availableGHSA-6w2r-r2m5-xq5w
—Django (PyPI)5.0a1 to before 5.1.125.1.12Patch availableGHSA-6w2r-r2m5-xq5w
—Django (PyPI)5.2a1 to before 5.2.65.2.6Patch availableGHSA-6w2r-r2m5-xq5w
  • Django Vendordjangoproject Affected 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 Fixed in 4.2.24, 5.1.12, 5.2.6 Patch available CNA
  • Django (PyPI) Vendor— Affected before 4.2.24 Fixed in 4.2.24 Patch available GHSA-6w2r-r2m5-xq5w
  • Django (PyPI) Vendor— Affected 5.0a1 to before 5.1.12 Fixed in 5.1.12 Patch available GHSA-6w2r-r2m5-xq5w
  • Django (PyPI) Vendor— Affected 5.2a1 to before 5.2.6 Fixed in 5.2.6 Patch available GHSA-6w2r-r2m5-xq5w

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6Vulnerabledjangoproject
  • cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 4.2 to before 4.2.24; 5.1 to before 5.1.12; 5.2 to before 5.2.6 Vulnerable ·djangoproject

Remediation

  • Fix · CNA Django (djangoproject) Fixed in 4.2.24, 5.1.12, 5.2.6
  • Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 4.2.24 Advisory →
  • Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 5.1.12 Advisory →
  • Fix · GHSA-6w2r-r2m5-xq5w Django (PyPI) Fixed in 5.2.6 Advisory →

Red Hat 10 advisories

  • RHSA-2025:17614 Released 2025-10-08 · Red Hat rating Important
    Satellite 6.15.5.5 Async Update
    • Red Hat Satellite 6.15 for RHEL 8 cjson-1.7.18-2.el8sat, puppet-agent-7.34.0-4.el8sat, python-django-4.2.24-0.1.el8pc +1
  • RHSA-2025:17613 Released 2025-10-08 · Red Hat rating Important
    Satellite 6.16.5.4 Async Update
    • Red Hat Satellite 6.16 for RHEL 8 cjson-1.7.18-2.el8sat, puppet-agent-8.8.1-3.el8sat, python-django-4.2.24-0.1.el8pc +1
    • Red Hat Satellite 6.16 for RHEL 9 cjson-1.7.18-2.el9sat, puppet-agent-8.8.1-3.el9sat, python-django-4.2.24-0.1.el9pc +1
  • RHSA-2025:17606 Released 2025-10-08 · Red Hat rating Important
    Satellite 6.17.5 Async Update
    • Red Hat Satellite 6.17 for RHEL 9 cjson-1.7.18-2.el9sat, puppet-agent-8.8.1-3.el9sat, python-django-4.2.24-0.1.el9pc +1
Show 7 more Red Hat advisories
  • RHSA-2025:17500 Released 2025-10-07 · Red Hat rating Important
    Red Hat OpenStack Services on OpenShift 18.0 (python-django) security update
    • Red Hat OpenStack Services on OpenShift 18.0 python-django-3.2.12-9.el9ost, python3-django-3.2.12-9.el9ost
  • RHSA-2025:17499 Released 2025-10-07 · Red Hat rating Important
    Red Hat OpenStack Platform 16.2 (python-django20) security update
    • Red Hat OpenStack Platform 16.2 python-django20-2.0.13-20.el8ost, python3-django20-2.0.13-20.el8ost
  • RHSA-2025:17498 Released 2025-10-07 · Red Hat rating Important
    Red Hat OpenStack Platform 17.1 (python-django) security update
    • Red Hat OpenStack Platform 17.1 python-django-2.2.24-12.el9ost, python3-django-2.2.24-12.el9ost
  • RHSA-2025:16514 Released 2025-09-23 · Red Hat rating Important
    Red Hat Ansible Automation Platform 2.5 Container Release Update
    • Red Hat Ansible Automation Platform 2.5 for RHEL 8 ansible-automation-platform-25/lightspeed-chatbot-rhel8, ansible-automation-platform-25/lightspeed-rhel8
  • RHSA-2025:16487 Released 2025-09-23 · Red Hat rating Important
    Red Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update
    • Red Hat Ansible Automation Platform 2.5 for RHEL 8 automation-controller-venv-tower-4.6.20-1.el8ap, python3.11-django-4.2.24-1.el8ap
    • Red Hat Ansible Automation Platform 2.5 for RHEL 9 automation-controller-venv-tower-4.6.20-1.el9ap, python3.11-django-4.2.24-1.el9ap
  • RHSA-2025:16404 Released 2025-09-22 · Red Hat rating Important
    Red Hat Ansible Automation Platform 2.4 Container Release Update
    • Red Hat Ansible Automation Platform 2.4 for RHEL 8 ansible-automation-platform-24/lightspeed-rhel8
  • RHSA-2025:16403 Released 2025-09-22 · Red Hat rating Important
    Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
    • Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-django-4.2.24-1.el8ap, python3x-django-4.2.24-1.el8ap
    • Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-django-4.2.24-1.el9ap, python3-django-4.2.24-1.el9ap

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Ansible Automation Platform 2AffectedNo fix yet
Red Hat Certification for Red Hat Enterprise Linux 7AffectedNo fix yet: Fix deferred
Red Hat Update Infrastructure 4 for Cloud ProvidersAffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2.4 for RHEL 8Fixed RHSA-2025:16403, RHSA-2025:16404
Red Hat Ansible Automation Platform 2.4 for RHEL 9Fixed RHSA-2025:16403
Red Hat Ansible Automation Platform 2.5 for RHEL 8Fixed RHSA-2025:16487, RHSA-2025:16514
Red Hat Ansible Automation Platform 2.5 for RHEL 9Fixed RHSA-2025:16487
Red Hat OpenStack Platform 16.2Fixed RHSA-2025:17499
Red Hat OpenStack Platform 17.1Fixed RHSA-2025:17498
Red Hat OpenStack Services on OpenShift 18.0Fixed RHSA-2025:17500
Red Hat Satellite 6.15 for RHEL 8Fixed RHSA-2025:17614
Red Hat Satellite 6.16 for RHEL 8Fixed RHSA-2025:17613
Red Hat Satellite 6.16 for RHEL 9Fixed RHSA-2025:17613
Red Hat Satellite 6.17 for RHEL 9Fixed RHSA-2025:17606
Not affected: 10 products
  • OpenShift Service Mesh 3
  • Red Hat Ansible Automation Platform 2
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8
  • Red Hat Ansible Automation Platform 2.4 for RHEL 9
  • Red Hat Ansible Automation Platform 2.5 for RHEL 8
  • Red Hat Ansible Automation Platform 2.5 for RHEL 9
  • Red Hat Satellite 6.15 for RHEL 8
  • Red Hat Satellite 6.16 for RHEL 8
  • Red Hat Satellite 6.16 for RHEL 9
  • Red Hat Satellite 6.17 for RHEL 9

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-57833
  2. 2026-10-03 Alias added: GHSA-6w2r-r2m5-xq5w

References

  • TI-2022-15177 An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. CVSS 3.1CRITICAL 9.8
  • TI-2020-05994 Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection… CVSS 3.1CRITICAL 9.8
  • TI-2023-10198 An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0… CVSS 3.1HIGH 7.5
  • TI-2019-14306 Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. CVSS 3.1CRITICAL 9.8
  • TI-2019-10595 An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x… CVSS 3.0CRITICAL 9.8
  • TI-2021-14006 Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection… CVSS 3.1CRITICAL 9.8
See all 156 →

Sources