CVE-2025-13372Django is vulnerable to SQL injection in column aliases
A medium-severity vulnerability reachable over the network, needing no privileges and user interaction. EPSS estimates a 0.5% chance of exploitation in the next 30 days. A fixed version is named.
- Exploited in the wild
- Not in KEV
- EPSS
- 0.5%
- percentile 40%
- Fix
- Named by a source
- CVE published 2 Dec 2025
Reference
None of the "Needs attention" rules apply right now.
EPSS 0.5% (+1) · Network attack vector (+10) · No privileges required (+5)
Immediate actions
- django (PyPI): upgrade to 5.2.9 / 5.1.15 / 4.2.27 or later on your release line.
- Patch: https://docs.djangoproject.com/en/dev/releases/security/
- Patch: https://www.djangoproject.com/weblog/2025/dec/02/security-releases/
- Commit / pull request: https://github.com/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf
- Commit / pull request: https://github.com/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0
- Commit / pull request: https://github.com/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e
- Commit / pull request: https://github.com/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355
- Advisory: https://groups.google.com/g/django-announce
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2025-13372
- Advisory: https://github.com/advisories/GHSA-rqw2-ghq9-44m7
Who should check
django (PyPI) pkg:pypi/django
- Affected>= 5.2a1, < 5.2.9Fixed in5.2.9OSV (GHSA-rqw2-ghq9-44m7)
- Affected>= 5.1a1, < 5.1.15Fixed in5.1.15OSV (GHSA-rqw2-ghq9-44m7)
- Affected>= 4.2a1, < 4.2.27Fixed in4.2.27OSV (GHSA-rqw2-ghq9-44m7)
- Affected>= 4.2, < 4.2.27Fixed in4.2.27OSV (PYSEC-2025-104)
- Affected>= 5.1, < 5.1.15Fixed in5.1.15OSV (PYSEC-2025-104)
- Affected>= 5.2, < 5.2.9Fixed in5.2.9OSV (PYSEC-2025-104)
djangoproject django product:djangoproject/django
- Affected>= 5.2, < 5.2.9Affected range ends before5.2.9as published by CNA (CVE List)
- Affected>= 5.1, < 5.1.15Affected range ends before5.1.15as published by CNA (CVE List)
- Affected>= 4.2, < 4.2.27Affected range ends before4.2.27as published by CNA (CVE List)
- Affected>= 4.2, < 4.2.27Affected range ends before4.2.27as published by CPE data (via the NVD API)
- Affected>= 5.1, < 5.1.15Affected range ends before5.1.15as published by CPE data (via the NVD API)
- Affected>= 5.2, < 5.2.9Affected range ends before5.2.9as published by CPE data (via the NVD API)
Products (not packages) are shown as their sources publish them. We check no product version against these ranges; a fixed version is the one the source names. Ask the vendor's advisory.
Confirmed facts
- CVSS
- 4.3 MEDIUM (version 3.1)
- Score from
- CISA-ADP
- Attack vector
- network
- Attack complexity
- low
- Privileges required
- none
- User interaction
- required
- Weakness
- CWE-89
- Exploitation (CISA SSVC)
- none
- Automatable (CISA SSVC)
- no
- Assigned by
- 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92
Unknowns
- We show one CVSS score. Other sources may score this CVE differently.
Advisory text
Quoted from the source advisory (untrusted)An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27. `FilteredRelation` is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the `**kwargs` passed to `QuerySet.annotate()` or `QuerySet.alias()` on PostgreSQL. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Stackered for reporting this issue.
Update history
- 2 Dec 2025Published
References
- patchhttps://docs.djangoproject.com/en/dev/releases/security/
- advisoryhttps://groups.google.com/g/django-announce
- patchhttps://www.djangoproject.com/weblog/2025/dec/02/security-releases/
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-13372
- commit / pull requesthttps://github.com/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf
- commit / pull requesthttps://github.com/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0
- commit / pull requesthttps://github.com/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e
- commit / pull requesthttps://github.com/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355
- commit / pull requesthttps://github.com/django/django/commit/f997037b235f6b5c9e7c4a501491ec45f3400f3d
- otherhttps://docs.djangoproject.com/en/dev/releases/security
- otherhttps://github.com/django/django
- otherhttps://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-104.yaml
- otherhttps://www.djangoproject.com/weblog/2025/dec/02/security-releases
- advisoryhttps://github.com/advisories/GHSA-rqw2-ghq9-44m7
Sources
- EPSS by FIRST.org, Free to use, attribution requested. Scores generated by Empirical Security.
- CVE-2025-13372 (CVE List (CNA and CISA ADP data, through the NVD API)), CVE terms of use. Copyright The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation.
- NVD API 2.0 (NIST), the API we query, NVD API terms of use. This product uses the NVD API but is not endorsed or certified by the NVD.
- GHSA-rqw2-ghq9-44m7 (GitHub Advisory Database), CC BY 4.0.
- PYSEC-2025-104 (PyPA Advisory Database), CC BY 4.0.
- OSV.dev, Per database.
This page is our own presentation: records are shortened, normalised and merged. Licences
Last checked: kev 44 min ago · osv 44 min ago · nvd 43 min ago · epss 43 min ago · JSON · ask via MCP: explain_vulnerability
Also known as BIT-django-2025-13372, GHSA-rqw2-ghq9-44m7, PYSEC-2025-104