CVE-2025-13372
Potential SQL injection in FilteredRelation column aliases on PostgreSQL
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.926% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:57:41.748Z | CISA KEV |
| cvss | unknown | unknown | unknown |
| epss | verified | 2026-11-19T16:04:40.125Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:01.389Z | OSV |
| affected | verified | 2026-11-19T12:01:28.465Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:01:28.465Z | CVE Program |
Affected versions and configuration
djangoproject Django; default status: unaffected: 5.2 to < 5.2.9 [affected; scheme: semver]; 5.2.9 [unaffected; scheme: semver]; 5.1 to < 5.1.15 [affected; scheme: semver]; 5.1.15 [unaffected; scheme: semver]; 4.2 to < 4.2.27 [affected; scheme: semver]; 4.2.27 [unaffected; scheme: semver]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
OSV · osv · full conditions
{
"id": "GHSA-rqw2-ghq9-44m7",
"aliases": [
"BIT-django-2025-13372",
"CVE-2025-13372",
"PYSEC-2025-104"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.2a1"
},
{
"fixed": "5.2.9"
}
]
}
],
"package": {
"name": "django",
"purl": "pkg:pypi/django",
"ecosystem": "PyPI"
},
"versions": [
"5.2",
"5.2.1",
"5.2.2",
"5.2.3",
"5.2.4",
"5.2.5",
"5.2.6",
"5.2.7",
"5.2.8",
"5.2a1",
"5.2b1",
"5.2rc1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-rqw2-ghq9-44m7/GHSA-rqw2-ghq9-44m7.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.1a1"
},
{
"fixed": "5.1.15"
}
]
}
],
"package": {
"name": "django",
"purl": "pkg:pypi/django",
"ecosystem": "PyPI"
},
"versions": [
"5.1",
"5.1.1",
"5.1.10",
"5.1.11",
"5.1.12",
"5.1.13",
"5.1.14",
"5.1.2",
"5.1.3",
"5.1.4",
"5.1.5",
"5.1.6",
"5.1.7",
"5.1.8",
"5.1.9",
"5.1a1",
"5.1b1",
"5.1rc1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-rqw2-ghq9-44m7/GHSA-rqw2-ghq9-44m7.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.2a1"
},
{
"fixed": "4.2.27"
}
]
}
],
"package": {
"name": "django",
"purl": "pkg:pypi/django",
"ecosystem": "PyPI"
},
"versions": [
"4.2",
"4.2.1",
"4.2.10",
"4.2.11",
"4.2.12",
"4.2.13",
"4.2.14",
"4.2.15",
"4.2.16",
"4.2.17",
"4.2.18",
"4.2.19",
"4.2.2",
"4.2.20",
"4.2.21",
"4.2.22",
"4.2.23",
"4.2.24",
"4.2.25",
"4.2.26",
"4.2.3",
"4.2.4",
"4.2.5",
"4.2.6",
"4.2.7",
"4.2.8",
"4.2.9",
"4.2a1",
"4.2b1",
"4.2rc1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-rqw2-ghq9-44m7/GHSA-rqw2-ghq9-44m7.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13372",
"type": "ADVISORY"
},
{
"url": "https://github.com/django/django/commit/479415ce5249bcdebeb6570c72df2a87f45a7bbf",
"type": "WEB"
},
{
"url": "https://github.com/django/django/commit/56aea00c3c5e1aacf4ed05f8ee06c2e78f02cea0",
"type": "WEB"
},
{
"url": "https://github.com/django/django/commit/5b90ca1e7591fa36fccf2d6dad67cf1477e6293e",
"type": "WEB"
},
{
"url": "https://github.com/django/django/commit/9c6a5bde24240382807d13bc3748d08444709355",
"type": "WEB"
},
{
"url": "https://github.com/django/django/commit/f997037b235f6b5c9e7c4a501491ec45f3400f3d",
"type": "WEB"
},
{
"url": "https://docs.djangoproject.com/en/dev/releases/security",
"type": "WEB"
},
{
"url": "https://github.com/django/django",
"type": "PACKAGE"
},
{
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-104.yaml",
"type": "WEB"
},
{
"url": "https://groups.google.com/g/django-announce",
"type": "WEB"
},
{
"url": "https://www.djangoproject.com/weblog/2025/dec/02/security-releases",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-89"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2025-12-02T16:15:53Z",
"github_reviewed_at": "2025-12-03T14:07:25Z"
}
}Archived source JSONOSV · osv · full conditions
{
"id": "PYSEC-2025-104",
"aliases": [
"BIT-django-2025-13372",
"CVE-2025-13372",
"GHSA-rqw2-ghq9-44m7"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.2"
},
{
"fixed": "4.2.27"
},
{
"introduced": "5.1"
},
{
"fixed": "5.1.15"
},
{
"introduced": "5.2"
},
{
"fixed": "5.2.9"
}
]
}
],
"package": {
"name": "django",
"purl": "pkg:pypi/django",
"ecosystem": "PyPI"
},
"versions": [
"4.2",
"4.2.1",
"4.2.10",
"4.2.11",
"4.2.12",
"4.2.13",
"4.2.14",
"4.2.15",
"4.2.16",
"4.2.17",
"4.2.18",
"4.2.19",
"4.2.2",
"4.2.20",
"4.2.21",
"4.2.22",
"4.2.23",
"4.2.24",
"4.2.25",
"4.2.26",
"4.2.3",
"4.2.4",
"4.2.5",
"4.2.6",
"4.2.7",
"4.2.8",
"4.2.9",
"5.1",
"5.1.1",
"5.1.10",
"5.1.11",
"5.1.12",
"5.1.13",
"5.1.14",
"5.1.2",
"5.1.3",
"5.1.4",
"5.1.5",
"5.1.6",
"5.1.7",
"5.1.8",
"5.1.9",
"5.2",
"5.2.1",
"5.2.2",
"5.2.3",
"5.2.4",
"5.2.5",
"5.2.6",
"5.2.7",
"5.2.8"
],
"database_specific": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/django/PYSEC-2025-104.yaml"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://groups.google.com/g/django-announce",
"type": "ADVISORY"
},
{
"url": "https://docs.djangoproject.com/en/dev/releases/security/",
"type": "FIX"
},
{
"url": "https://www.djangoproject.com/weblog/2025/dec/02/security-releases/",
"type": "FIX"
},
{
"url": "https://github.com/advisories/GHSA-rqw2-ghq9-44m7",
"type": "ADVISORY"
}
],
"relatedGitRanges": [],
"database_specific": {}
}Archived source JSONCVE Program · cve-json · full conditions
{
"affected": [
{
"repo": "https://github.com/django/django/",
"vendor": "djangoproject",
"product": "Django",
"versions": [
{
"status": "affected",
"version": "5.2",
"lessThan": "5.2.9",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.2.9",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.1",
"lessThan": "5.1.15",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "5.1.15",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.2",
"lessThan": "4.2.27",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "4.2.27",
"versionType": "semver"
}
],
"packageName": "django",
"collectionURL": "https://pypi.org/project/Django/",
"defaultStatus": "unaffected"
}
],
"additionalContainers": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 4.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N",
"integrityImpact": "NONE",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "LOW"
}
},
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2025-13372",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2025-12-02T15:43:29.673288Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2025-12-02T15:43:47.127Z"
}
}
]
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | PyPI / package | django | Not a distribution channel | 5.2.9 | Official record |
| ecosystem-boundary | PyPI / package | django | Not a distribution channel | 5.1.15 | Official record |
| ecosystem-boundary | PyPI / package | django | Not a distribution channel | 4.2.27 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:52:01.389ZArchived source JSON
Source publication: 2025-12-02T18:30:35.000Z
Source modification: 2026-09-10T03:50:58.796ZDocument fingerprint
5a8be0996fde40ecda7b6ec330977c591c5041d8f88a9054d3364a892c671177 - OSVConsulted: 2026-11-19T12:52:01.389ZArchived source JSON
Source publication: 2025-12-02T16:15:53.907Z
Source modification: 2026-06-10T17:01:10.795ZDocument fingerprint
5a8be0996fde40ecda7b6ec330977c591c5041d8f88a9054d3364a892c671177 - CVE ProgramConsulted: 2026-11-19T12:01:28.465ZArchived source JSON
Source publication: 2025-12-02T15:13:35.692Z
Source modification: 2025-12-02T15:43:47.127ZDocument fingerprint
312d2fa2b1caafac9d133832c29e1f0dac2fb6d6f868e38218656f6f73b60fc9 - CISA KEVConsulted: 2026-11-19T16:57:41.748ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:40.125ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
7110337ea01b81d7d0eef5fde179582e77e740d9cbc9bc26ad284dce47f01898
Official status history
- UNKNOWN → PUBLISHED · · evidence