{"schemaVersion":3,"id":"CVE-2025-64459","aliases":["MGASA-2025-0292","GHSA-frmv-pr5f-9mcr","BIT-django-2025-64459","PYSEC-2025-108","RHSA-2025:23070","UBUNTU-CVE-2025-64459","USN-7859-1","DEBIAN-CVE-2025-64459","openSUSE-SU-2025:15708-1","openSUSE-SU-2025:15712-1"],"status":"published","duplicateOf":null,"title":null,"description":"An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8.\nThe methods `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`, and the class `Q()`, are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the `_connector` argument.\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 cyberstan for reporting this issue.","dates":{"published":"2025-11-05T15:09:58.239Z","modified":"2026-02-26T17:47:16.519Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.1,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":10,"impact":8.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Red hat","score":8.3,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","exploitability":10,"impact":6.2,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":10,"impact":8.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":10,"impact":8.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.1,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.19257,"percentile":0.97314,"severity":"medium","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":-0.13900000000000023,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.19396},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.19257,"percentile":0.97314}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.19396,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.19257,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.19257,"percentile":0.97314}]},"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":[{"id":"REF_7F98ED4E7B554C94","name":"Exploit Reference (shivasurya.me)","source":"reference","url":"https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"52456","name":"Django 5.1.13 - SQL Injection","source":"exploit-database","url":"https://www.exploit-db.com/exploits/52456","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["multiple"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"multiple","file":"exploits/multiple/webapps/52456.py","codes":["CVE-2025-64459"]},"metasploit":null}],"exploitCount":2,"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":"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.26-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3:3.2.25-0+deb12u1 | < 3:4.2.27-0+deb13u1 | < 3:4.2.26-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":"< 2:2.2.12-1ubuntu0.29+esm5","noFixRecorded":false,"fixedIn":null},{"text":"< 2:3.2.12-2ubuntu1.23","noFixRecorded":false,"fixedIn":null},{"text":"< 3:4.2.11-1ubuntu1.12","noFixRecorded":false,"fixedIn":null},{"text":"< 3:5.2.4-1ubuntu2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2:2.2.12-1ubuntu0.29+esm5 | < 2:3.2.12-2ubuntu1.23 | < 3:4.2.11-1ubuntu1.12 | < 3:5.2.4-1ubuntu2.1","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.26","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.1, < 5.1.14","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.2, < 5.2.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.2, < 4.2.26 | ≥ 5.1, < 5.1.14 | ≥ 5.2, < 5.2.8","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"django","label":"Django","category":"framework"}},"hubHref":"/vendor/djangoproject/django"},{"vendor":"mageia","product":"python-django","name":"python-django","label":"python-django","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/python-django","purlType":"rpm","versions":[{"text":"< 4.1.13-1.8.mga9","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.1.13-1.8.mga9","eol":null,"hubHref":null},{"vendor":"PyPI","product":"django","name":"django","label":"django","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/django","purlType":"pypi","versions":[{"text":"≥ 5.2a1, < 5.2.8","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0a1, < 5.1.14","noFixRecorded":false,"fixedIn":null},{"text":"< 4.2.26","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.2, < 5.2.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 5.2a1, < 5.2.8 | ≥ 5.0a1, < 5.1.14 | < 4.2.26 | ≥ 5.2, < 5.2.8","eol":null,"hubHref":null},{"vendor":"opensuse","product":"python-Django4&distro=openSUSE Tumbleweed","name":"python-Django4","label":"python-Django4&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/python-Django4&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 4.2.26-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.2.26-1.1","eol":null,"hubHref":null},{"vendor":"opensuse","product":"python-Django&distro=openSUSE Tumbleweed","name":"python-Django","label":"python-Django&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/python-Django&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 5.2.8-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.2.8-1.1","eol":null,"hubHref":null},{"vendor":"redhat","product":"automation-controller-venv-tower","name":"automation-controller-venv-tower","label":"automation-controller-venv-tower","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/automation-controller-venv-tower","purlType":"rpm","versions":[{"text":"< 0:4.7.6-1.el9ap","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:4.7.6-1.el9ap","eol":null,"hubHref":null},{"vendor":"redhat","product":"python3.11-django","name":"python3.11-django","label":"python3.11-django","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/python3.11-django","purlType":"rpm","versions":[{"text":"< 0:4.2.26-2.el9ap","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:4.2.26-2.el9ap","eol":null,"hubHref":null}],"affectedCount":9,"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":["Vendor Advisory","Advisory","ARTICLE"]},{"url":"https://groups.google.com/g/django-announce","label":"groups.google.com/g/django-announce","hostname":"groups.google.com","tags":["Mailing List","WEB","ARTICLE"]},{"url":"https://www.djangoproject.com/weblog/2025/nov/05/security-releases/","label":"www.djangoproject.com/weblog/2025/nov/05/security-releases/","hostname":"www.djangoproject.com","tags":["Vendor Advisory","Advisory","ARTICLE"]},{"url":"https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html","label":"shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html","hostname":"shivasurya.me","tags":["WEB","EVIDENCE","Exploit","Third Party Advisory"]},{"url":"https://advisories.mageia.org/MGASA-2025-0292.html","label":"advisories.mageia.org/MGASA-2025-0292.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=34727","label":"bugs.mageia.org/show_bug.cgi?id=34727","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://www.openwall.com/lists/oss-security/2025/11/05/12","label":"www.openwall.com/lists/oss-security/2025/11/05/12","hostname":"www.openwall.com","tags":["WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-64459","label":"nvd.nist.gov/vuln/detail/CVE-2025-64459","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/django/django/commit/06dd38324ac3d60d83d9f3adabf0dcdf423d2a85","label":"github.com/django/django/commit/06dd38324ac3d60d83d9f3adabf0dcdf423d2a85","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/django/django/commit/59ae82e67053d281ff4562a24bbba21299f0a7d4","label":"github.com/django/django/commit/59ae82e67053d281ff4562a24bbba21299f0a7d4","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/django/django/commit/6703f364d767e949c5b0e4016433ef75063b4f9b","label":"github.com/django/django/commit/6703f364d767e949c5b0e4016433ef75063b4f9b","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/django/django/commit/72d2c87431f2ae0431d65d0ec792047f078c8241","label":"github.com/django/django/commit/72d2c87431f2ae0431d65d0ec792047f078c8241","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/omarkurt/django-connector-CVE-2025-64459-testbed","label":"github.com/omarkurt/django-connector-CVE-2025-64459-testbed","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-108.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2025-108.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://www.djangoproject.com/weblog/2025/nov/05/security-releases","label":"www.djangoproject.com/weblog/2025/nov/05/security-releases","hostname":"www.djangoproject.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-frmv-pr5f-9mcr","label":"github.com/advisories/GHSA-frmv-pr5f-9mcr","hostname":"github.com","tags":["Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2025:23070","label":"access.redhat.com/errata/RHSA-2025:23070","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#important","label":"access.redhat.com/security/updates/classification/","hostname":"access.redhat.com","tags":["ARTICLE"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2412651","label":"bugzilla.redhat.com/show_bug.cgi?id=2412651","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_23070.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2025/rhsa-2025_23070.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2025-64459","label":"access.redhat.com/security/cve/CVE-2025-64459","hostname":"access.redhat.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-64459","label":"www.cve.org/CVERecord?id=CVE-2025-64459","hostname":"www.cve.org","tags":["Advisory","REPORT"]},{"url":"https://github.com/django/django/commit/c880530ddd4fabd5939bab0e148bebe36699432a","label":"github.com/django/django/commit/c880530ddd4fabd5939bab0e148bebe36699432a","hostname":"github.com","tags":["ARTICLE"]},{"url":"https://ubuntu.com/security/CVE-2025-64459","label":"ubuntu.com/security/CVE-2025-64459","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-7859-1","label":"ubuntu.com/security/notices/USN-7859-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-64459","label":"security-tracker.debian.org/tracker/CVE-2025-64459","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2025-64459","label":"www.suse.com/security/cve/CVE-2025-64459","hostname":"www.suse.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["DLA-4425-1","DSA-6117-1","DSA-6136-1","OPENSUSE-SU-2025:20153-1","OPENSUSE-SU-2026:10005-1","OPENSUSE-SU-2026:11270-1","RHSA-2025:23069","SUSE-SU-2025:4100-1"],"duplicates":[],"related":["OPENSUSE-SU-2025:20153-1","OPENSUSE-SU-2026:10005-1","OPENSUSE-SU-2026:11270-1","SUSE-SU-2025:4100-1"]},"timeline":[{"kind":"published","date":"2025-11-05T15:09:58.239Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-02-26T17:47:16.519Z","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-20T06:46:25.801Z","stale":false,"partial":false}}