Skip to main content
← All vulnerabilities
CVE-2025-59681GHSA-HPR9-3M2G-3J9PBIT-DJANGO-2025-59681PYSEC-2025-106

An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7.

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.2.25, 5.1.13, 5.2.7
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and MariaDB).

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • djangoproject Django

    From 4.2 · fixed in 4.2.25; From 5.1 · fixed in 5.1.13; From 5.2 · fixed in 5.2.7

  • djangoPyPI

    From 4.2 · fixed in 4.2.25

  • djangoPyPI

    From 5.1 · fixed in 5.1.13

  • djangoPyPI

    From 5.2 · fixed in 5.2.7

  • djangoPyPI

    From 4.2 · fixed in 4.2.25; From 5.1 · fixed in 5.1.13; From 5.2 · fixed in 5.2.7

References 3

docs.djangoproject.com

groups.google.com

djangoproject.com