{"schemaVersion":3,"id":"CVE-2025-59681","aliases":["GHSA-hpr9-3m2g-3j9p","BIT-django-2025-59681","PYSEC-2025-106","UBUNTU-CVE-2025-59681","DEBIAN-CVE-2025-59681","CGA-h86q-qvpq-rx5h","CGA-qmh9-xcxq-v8cm"],"status":"published","duplicateOf":null,"title":null,"description":"An issue was discovered in Django 4.2 before 4.2.25, 5.1 before 5.1.13, and 5.2 before 5.2.7. QuerySet.annotate(), QuerySet.alias(), QuerySet.aggregate(), and QuerySet.extra() are subject to SQL injection in column aliases, when using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to these methods (on MySQL and MariaDB).","dates":{"published":"2025-10-01T00:00:00.000Z","modified":"2025-11-04T21:13:55.046Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:N","exploitability":4.6,"impact":7.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00625,"percentile":0.48971,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00625},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00625,"percentile":0.48971}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00625,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00625,"percentile":0.48971}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","description":"The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/89.html"}],"affected":[{"vendor":"chainguard","product":"awx","name":"awx","label":"awx","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/awx","purlType":"apk","versions":[{"text":"< 24.6.1-r17","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 24.6.1-r17","eol":null,"hubHref":null},{"vendor":"debian","product":"python-django","name":"python-django","label":"python-django","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/python-django","purlType":"deb","versions":[{"text":"< 3:3.2.25-0+deb12u1","noFixRecorded":false,"fixedIn":null},{"text":"< 3:4.2.27-0+deb13u1","noFixRecorded":false,"fixedIn":null},{"text":"< 3:4.2.25-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3:3.2.25-0+deb12u1 | < 3:4.2.27-0+deb13u1 | < 3:4.2.25-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"python-django","name":"python-django","label":"python-django","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/python-django","purlType":"deb","versions":[{"text":"< 1.6.11-0ubuntu1.3+esm8","noFixRecorded":false,"fixedIn":null},{"text":"< 1.8.7-1ubuntu5.15+esm9","noFixRecorded":false,"fixedIn":null},{"text":"< 1:1.11.11-1ubuntu1.21+esm12","noFixRecorded":false,"fixedIn":null},{"text":"< 2:2.2.12-1ubuntu0.29+esm4","noFixRecorded":false,"fixedIn":null},{"text":"< 2:3.2.12-2ubuntu1.22","noFixRecorded":false,"fixedIn":null},{"text":"< 3:4.2.11-1ubuntu1.11","noFixRecorded":false,"fixedIn":null},{"text":"< 3:5.2.4-1ubuntu2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.6.11-0ubuntu1.3+esm8 | < 1.8.7-1ubuntu5.15+esm9 | < 1:1.11.11-1ubuntu1.21+esm12 | < 2:2.2.12-1ubuntu0.29+esm4 | < 2:3.2.12-2ubuntu1.22 | < 3:4.2.11-1ubuntu1.11 | < 3:5.2.4-1ubuntu2","eol":null,"hubHref":null},{"vendor":"djangoproject","product":"django","name":"django","label":"django","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 4.2, < 4.2.25","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.1, < 5.1.13","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.2, < 5.2.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.2, < 4.2.25 | ≥ 5.1, < 5.1.13 | ≥ 5.2, < 5.2.7","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"django","label":"Django","category":"framework"}},"hubHref":"/vendor/djangoproject/django"},{"vendor":"PyPI","product":"django","name":"django","label":"django","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/django","purlType":"pypi","versions":[{"text":"≥ 4.2, < 4.2.25","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.1, < 5.1.13","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.2, < 5.2.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.2, < 4.2.25 | ≥ 5.1, < 5.1.13 | ≥ 5.2, < 5.2.7","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://docs.djangoproject.com/en/dev/releases/security/","label":"docs.djangoproject.com/en/dev/releases/security/","hostname":"docs.djangoproject.com","tags":["Advisory","WEB","Vendor Advisory"]},{"url":"https://groups.google.com/g/django-announce","label":"groups.google.com/g/django-announce","hostname":"groups.google.com","tags":["WEB","Advisory","Release Notes","Vendor Advisory"]},{"url":"https://www.djangoproject.com/weblog/2025/oct/01/security-releases/","label":"www.djangoproject.com/weblog/2025/oct/01/security-releases/","hostname":"www.djangoproject.com","tags":["Advisory","ARTICLE","Release Notes","Vendor Advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2025/10/01/3","label":"www.openwall.com/lists/oss-security/2025/10/01/3","hostname":"www.openwall.com","tags":["WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59681","label":"nvd.nist.gov/vuln/detail/CVE-2025-59681","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/django/django/commit/41b43c74bda19753c757036673ea9db74acf494a","label":"github.com/django/django/commit/41b43c74bda19753c757036673ea9db74acf494a","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e","label":"github.com/django/django/commit/43d84aef04a9e71164c21a74885996981857e66e","hostname":"github.com","tags":["WEB"]},{"url":"https://docs.djangoproject.com/en/dev/releases/security","label":"docs.djangoproject.com/en/dev/releases/security","hostname":"docs.djangoproject.com","tags":["WEB"]},{"url":"https://github.com/django/django","label":"github.com/django/django","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-106.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-106.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://www.djangoproject.com/weblog/2025/oct/01/security-releases","label":"www.djangoproject.com/weblog/2025/oct/01/security-releases","hostname":"www.djangoproject.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-hpr9-3m2g-3j9p","label":"github.com/advisories/GHSA-hpr9-3m2g-3j9p","hostname":"github.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-59681","label":"ubuntu.com/security/CVE-2025-59681","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-59681","label":"www.cve.org/CVERecord?id=CVE-2025-59681","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-7794-1","label":"ubuntu.com/security/notices/USN-7794-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-59681","label":"security-tracker.debian.org/tracker/CVE-2025-59681","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59681.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59681.json","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DLA-4324-1","DSA-6117-1","DSA-6136-1","MGASA-2025-0243","OPENSUSE-SU-2025:15596-1","OPENSUSE-SU-2025:15598-1","OPENSUSE-SU-2025:20022-1","OPENSUSE-SU-2026:10005-1","OPENSUSE-SU-2026:11270-1","SUSE-SU-2025:03446-1","USN-7794-1"],"duplicates":[],"related":["CGA-4W8M-W3PM-C448","CGA-8RQX-36G6-M52C","OPENSUSE-SU-2025:15596-1","OPENSUSE-SU-2025:15598-1","OPENSUSE-SU-2025:20022-1","OPENSUSE-SU-2026:10005-1","OPENSUSE-SU-2026:11270-1","SUSE-SU-2025:03446-1","USN-7794-1"]},"timeline":[{"kind":"published","date":"2025-10-01T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-11-04T21:13:55.046Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T12:00:32.031Z","stale":false,"partial":false}}