{"id":"CVE-2025-13372","aliases":["CVE-2025-13372","GHSA-rqw2-ghq9-44m7","BIT-DJANGO-2025-13372","PYSEC-2025-104"],"related":[],"kind":"vulnerability","state":"published","title":"Potential SQL injection in FilteredRelation column aliases on PostgreSQL","summary":"An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.\n`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.\nEarlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\nDjango would like to thank Stackered for reporting this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27.\n`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.\nEarlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\nDjango would like to thank Stackered for reporting this issue.","source":"cvelist"},{"lang":"es","text":"Se descubrió un problema en 5.2 anterior a 5.2.9, 5.1 anterior a 5.1.15, y 4.2 anterior a 4.2.27.\n'FilteredRelation' está sujeto a inyección SQL en alias de columna, utilizando un diccionario adecuadamente elaborado, con expansión de diccionario, como los 'kwargs' pasados a 'QuerySet.annotate()' o 'QuerySet.alias()' en PostgreSQL.\nSeries de Django anteriores y no soportadas (como 5.0.x, 4.1.x y 3.2.x) no fueron evaluadas y también pueden estar afectadas.\nDjango desea agradecer a Stackered por informar de este problema.","source":"nvd"}],"published":"2025-12-02T15:13:35.692Z","modified":"2026-10-18T18:10:00.100Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"type":"semver","introduced":"5.2","fixed":"5.2.9","status":"affected"},{"type":"semver","version":"5.2.9","status":"unaffected"},{"type":"semver","introduced":"5.1","fixed":"5.1.15","status":"affected"},{"type":"semver","version":"5.1.15","status":"unaffected"},{"type":"semver","introduced":"4.2","fixed":"4.2.27","status":"affected"},{"type":"semver","version":"4.2.27","status":"unaffected"}],"vendor":"djangoproject","product":"Django","package":"django","repo":"https://github.com/django/django/","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.2a1","status":"affected","fixed":"5.2.9"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.1a1","status":"affected","fixed":"5.1.15"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.2a1","status":"affected","fixed":"4.2.27"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.2","fixed":"4.2.27"},{"status":"affected","introduced":"5.1","fixed":"5.1.15"},{"status":"affected","introduced":"5.2","fixed":"5.2.9"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"4.2","status":"affected","fixed":"4.2.27"},{"type":"ecosystem","introduced":"5.1","status":"affected","fixed":"5.1.15"},{"type":"ecosystem","introduced":"5.2","status":"affected","fixed":"5.2.9"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"4.2.0","status":"affected","fixed":"4.2.27"},{"type":"semver","introduced":"5.1.0","status":"affected","fixed":"5.1.15"},{"type":"semver","introduced":"5.2.0","status":"affected","fixed":"5.2.9"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://docs.djangoproject.com/en/dev/releases/security/","tags":["advisory","fix","patch","vendor-advisory"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://groups.google.com/g/django-announce","tags":["advisory","discussion","mailing-list","release-notes","web"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2025/dec/02/security-releases/","tags":["advisory","fix","patch","vendor-advisory"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-13372","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/f997037b235f6b5c9e7c4a501491ec45f3400f3d","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.djangoproject.com/en/dev/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-104.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2025/dec/02/security-releases","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-rqw2-ghq9-44m7","tags":["advisory"],"sources":["pysec"]}],"credits":["Stackered","Jacob Walls","Natalia Bidart"],"assigner":"DSF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-12-02T15:43:29.673Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-13372","url":"https://www.cve.org/CVERecord?id=CVE-2025-13372","licence":"CVE Terms of Use","modified":"2025-12-02T15:43:47.127Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rqw2-ghq9-44m7","url":"https://github.com/advisories/GHSA-rqw2-ghq9-44m7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:58.796Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-13372","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-13372","licence":"Public domain","modified":"2026-10-18T18:10:00.100Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2025-104","url":"https://osv.dev/vulnerability/PYSEC-2025-104","licence":"CC-BY-4.0","modified":"2026-06-10T17:01:10.795Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2025-13372","url":"https://osv.dev/vulnerability/BIT-DJANGO-2025-13372","licence":"Apache-2.0","modified":"2026-09-08T08:46:36.754Z"}],"updatedAt":"2026-11-25T22:59:08.194Z","epss":{"score":0.00926,"percentile":0.61505,"date":"2026-12-01T12:00:22.000Z"}}