{"id":"CVE-2025-57833","published":"2025-09-03T00:00:00Z","modified":"2025-11-04T21:13:19Z","title":"An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6","vendor":"djangoproject","product":"Django","tier":"tail","description":{"text":"An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed QuerySet.annotate() or QuerySet.alias().","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00836,"percentile":0.54977,"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":[]},{"url":"https://groups.google.com/g/django-announce","tags":[]},{"url":"https://www.djangoproject.com/weblog/2025/sep/03/security-releases/","tags":[]},{"url":"https://medium.com/@EyalSec/django-unauthenticated-0-click-rce-and-sql-injection-using-default-configuration-059964f3f898","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2025/09/msg00017.html","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/09/03/3","tags":[]}],"priority":{"score":21.0,"factors":[{"name":"EPSS percentile","points":11.0},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.97}]},"exploitSources":{"pocGithub":{"count":6,"skipped":0,"earliest":"2025-09-05","earliestUrl":"https://github.com/Mkway/CVE-2025-57833","repos":[{"name":"sw0rd1ight/CVE-2025-57833","url":"https://github.com/sw0rd1ight/CVE-2025-57833","stars":6,"created":"2025-11-02"},{"name":"Mkway/CVE-2025-57833","url":"https://github.com/Mkway/CVE-2025-57833","stars":2,"created":"2025-09-05"},{"name":"loic-houchi/Django-faille-CVE-2025-57833_test","url":"https://github.com/loic-houchi/Django-faille-CVE-2025-57833_test","stars":2,"created":"2025-09-09"},{"name":"ianoboyle/CVE-2025-57833","url":"https://github.com/ianoboyle/CVE-2025-57833","stars":1,"created":"2025-10-08"},{"name":"Gayang2902/CVE-2025-57833","url":"https://github.com/Gayang2902/CVE-2025-57833","stars":1,"created":"2025-11-27"}]},"first":{"date":"2025-09-05","source":"PoC-in-GitHub","url":"https://github.com/Mkway/CVE-2025-57833"},"provenance":"source"},"vendorSlug":"djangoproject","affectedVersions":[{"vendor":"djangoproject","product":"Django","versions":[">= 4.2, < 4.2.24",">= 5.1, < 5.1.12",">= 5.2, < 5.2.6"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-09-08T17:33:03.859285Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":["<4.2.24",">=5.0a1, <5.1.12",">=5.2a1, <5.2.6",">=4.2, <4.2.24",">=5.1, <5.1.12",">=5.2, <5.2.6"],"patched":["4.2.24","5.1.12","5.2.6"],"from":["GHSA-6w2r-r2m5-xq5w","PYSEC-2025-105"],"provenance":"source"}],"summary":{"text":"The flaw is an SQL injection in Django's FilteredRelation, affecting Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6, where column aliases are not properly neutralised. An attacker who can supply a crafted dictionary expanded as kwargs to QuerySet.annotate() or QuerySet.alias() can inject SQL, which requires the application to pass such input and the attacker to have network access with low privileges and nothing beyond that, with no user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:02:53Z"},"euvd":{"id":"EUVD-2025-26641","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-djangoproject-django-cve-2025-57833","packageHistory":[{"cve":"CVE-2025-27556","published":"2025-04-02","fixed":"5.1.8","kev":false},{"cve":"CVE-2025-32873","published":"2025-05-08","fixed":"5.2.1","kev":false},{"cve":"CVE-2025-48432","published":"2025-06-05","fixed":"5.2.2","kev":false,"link":{"from":"CVE-2025-48432","to":"CVE-2025-57833","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"4.2.22","toFixed":"4.2.24","daysApart":90},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"5.1.10","toFixed":"5.1.12","daysApart":90}]}},{"cve":"CVE-2025-57833","published":"2025-09-03","fixed":"5.2.6","kev":false},{"cve":"CVE-2025-59681","published":"2025-10-01","fixed":"5.2.7","kev":false,"link":{"from":"CVE-2025-57833","to":"CVE-2025-59681","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"4.2.24","toFixed":"4.2.25","daysApart":28},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"5.1.12","toFixed":"5.1.13","daysApart":28},{"kind":"same-code","provenance":"machine","files":["django/db/models/sql/query.py"],"commits":["https://github.com/django/django/commit/102965ea93072fe3c39a30be437c683ec1106ef5","https://github.com/django/django/commit/31334e6965ad136a5e369993b01721499c5d1a92","https://github.com/django/django/commit/41b43c74bda19753c757036673ea9db74acf494a","https://github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e"],"basis":"shared file"},{"kind":"similar","provenance":"machine","score":0.85,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2025-13372","published":"2025-12-02","fixed":"5.2.9","kev":false},{"cve":"CVE-2025-64460","published":"2025-12-02","fixed":"5.2.9","kev":false}],"package":"PyPI:Django"}}