{"id":"CVE-2025-13372","published":"2025-12-02T15:13:35Z","modified":"2025-12-02T15:43:47Z","title":"Potential SQL injection in FilteredRelation column aliases on PostgreSQL","vendor":"djangoproject","product":"Django","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00926,"percentile":0.61339,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://docs.djangoproject.com/en/dev/releases/security/","tags":["vendor-advisory"]},{"url":"https://groups.google.com/g/django-announce","tags":["mailing-list"]},{"url":"https://www.djangoproject.com/weblog/2025/dec/02/security-releases/","tags":["vendor-advisory"]}],"priority":{"score":15.3,"factors":[{"name":"EPSS percentile","points":12.27},{"name":"CVSS severity","points":3.01}]},"vendorSlug":"djangoproject","affectedVersions":[{"vendor":"djangoproject","product":"Django","versions":[">= 5.2, < 5.2.9",">= 5.1, < 5.1.15",">= 4.2, < 4.2.27"]}],"fixedVersions":[{"vendor":"djangoproject","product":"Django","versions":["5.2.9","5.1.15","4.2.27"]}],"capec":[{"id":"CAPEC-66","name":"SQL Injection"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-12-02T15:43:29.673288Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=5.2a1, <5.2.9",">=5.1a1, <5.1.15",">=4.2a1, <4.2.27",">=4.2, <4.2.27",">=5.1, <5.1.15",">=5.2, <5.2.9"],"patched":["5.2.9","5.1.15","4.2.27"],"from":["GHSA-rqw2-ghq9-44m7","PYSEC-2025-104"],"provenance":"source"}],"summary":{"text":"The flaw is a SQL injection weakness in Django's FilteredRelation column aliases when used on PostgreSQL, affecting the 5.2, 5.1 and 4.2 release series before their fixed releases. An attacker who can get a crafted dictionary expanded as keyword arguments into QuerySet.annotate() or QuerySet.alias() can inject SQL, and this requires network access to the application, no authentication, and user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:35:48Z"},"euvd":{"id":"EUVD-2025-200249","exploited":false,"provenance":"source"}}