{"answers":{"affected":"8 open source packages ship an affected version, including django. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-64459 in the wild and no public exploit code.","fix":"Upgrade django to a fixed version for your release line: 4.2.26, 5.1.14 or 5.2.8.","what":"CVE-2025-64459 is a critical SQL injection vulnerability in Djangoproject Django, published on 5 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-64459 and fix it if it is affected.\n\nWhat it is: CVE-2025-64459 is a critical SQL injection vulnerability in Djangoproject Django, published on 5 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-64459 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- django (Bitnami): affected from 4.2.0; fixed in 4.2.26, 5.1.14, 5.2.8\n- django (PyPI): affected all versions; fixed in 4.2.26\n- django (PyPI): affected all versions; fixed in 4.2.26\n- django (PyPI): affected from 4.2; fixed in 4.2.26, 5.1.14, 5.2.8\n- django (PyPI): affected from 5.0a1; fixed in 5.1.14\n- django (PyPI): affected from 5.0a1; fixed in 5.1.14\n- django (PyPI): affected from 5.2a1; fixed in 5.2.8\n- django (PyPI): affected from 5.2a1; fixed in 5.2.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-64459/ (Markdown: https://insights.sbomify.com/CVE-2025-64459/index.md)","id":"CVE-2025-64459","markdown":"https://insights.sbomify.com/CVE-2025-64459/index.md","name":"CVE-2025-64459","record":{"aliases":["BIT-django-2025-64459","CLSA-2026-1786600198","CLSA-2026-1786604588","CLSA-2026-1786616091","CLSA-2026-1786616142","CLSA-2026-1786616143","CLSA-2026-1787718155","DEBIAN-CVE-2025-64459","ECHO-1dc5-af13-00c1","GHSA-frmv-pr5f-9mcr","MGASA-2025-0292","MINI-w5w4-2wvv-vrf5","OESA-2026-1206","PYSEC-2025-108","RHSA-2025:23070","ROOT-APP-PYPI-CVE-2025-64459","UBUNTU-CVE-2025-64459","USN-7859-1","openSUSE-SU-2025:15708-1","openSUSE-SU-2025:15712-1"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Django web framework","requires_auth":"none","summary":"Attackers can execute arbitrary SQL commands via crafted dictionary arguments in Django QuerySet and Q objects, potentially reading or modifying database contents.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"DSF","cpe":[{"product":"django","vendor":"djangoproject"}],"cvss":{"score":9.1,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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.","ecosystems":["Bitnami","PyPI","Red Hat:ansible_automation_platform:2.6::el9","Red Hat:ansible_automation_platform_developer:2.6::el9","openSUSE:Tumbleweed"],"exploits":{"exploitdb":1,"first_seen":"2025-11-06","github_poc":10,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-11-21T22:13:56Z","kind":"github_poc","ref":"https://github.com/omarkurt/django-connector-CVE-2025-64459-testbed","stars":2,"title":"A self-contained testbed for Django CVE-2025-64459. Demonstrates QuerySet.filter() parameter injection via dictionary expansion using Docker."},{"date":"2025-12-01T03:34:47Z","kind":"github_poc","ref":"https://github.com/0xCyberstan/CVE-2025-64459-Poc","stars":2,"title":"Vulnerability: SQL Injection via QuerySet and Q() keyword argument unpacking. CVE ID: CVE-2025-64459 Severity: Critical (CVSS 9.1) Affected Versions: Django 5.1 \u003c 5.1.14, 4.2 \u003c 4.2.26, and 5.2 \u003c 5.2.8. Researcher: Cyberstan (University of Warwick)"},{"date":"2025-11-10T13:08:57Z","kind":"github_poc","ref":"https://github.com/nunpa/CVE-2025-64459","stars":1,"title":"check if vulnerable python-django version  to CVE-2025-64459 bug"},{"date":"2025-11-06T08:21:39Z","kind":"github_poc","ref":"https://github.com/rockmelodies/django_sqli_target_CVE-2025-64459","stars":0,"title":null},{"date":"2025-12-03","kind":"exploitdb","ref":"52456","stars":null,"title":"Django 5.1.13 - SQL Injection"},{"date":"2025-12-05T03:38:19Z","kind":"github_poc","ref":"https://github.com/Z3YR0xX/CVE-2025-64459","stars":0,"title":null},{"date":"2026-01-08T13:51:05Z","kind":"github_poc","ref":"https://github.com/alxsourin/Helpdesk-Telecom-CVE-2025-64459","stars":0,"title":null},{"date":"2026-01-14T15:55:41Z","kind":"github_poc","ref":"https://github.com/purehate/CVE-2025-64459-hunter","stars":0,"title":"CVE-2025-64459-hunter"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Potential SQL injection via _connector keyword argument in QuerySet and Q objects","id":"CVE-2025-64459","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"djangoproject:django","products":["djangoproject:django"],"type":"sql_injection","year":"2025"},"n_packages":13,"n_references":3,"next":{"headline":"Potential denial-of-service vulnerability in XML serializer text extraction","id":"CVE-2025-64460"},"packages":[{"ecosystem":"Bitnami","fixed":["4.2.26","5.1.14","5.2.8"],"introduced":["4.2.0","5.1.0","5.2.0"],"last_affected":[],"package":"django","purl":"pkg:bitnami/django","source":"BIT-django-2025-64459"},{"ecosystem":"PyPI","fixed":["4.2.26"],"introduced":["0"],"last_affected":[],"package":"django","purl":null,"source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"PyPI","fixed":["4.2.26"],"introduced":["0"],"last_affected":[],"package":"django","purl":"pkg:pypi/django","source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"PyPI","fixed":["4.2.26","5.1.14","5.2.8"],"introduced":["4.2","5.1","5.2"],"last_affected":[],"package":"django","purl":"pkg:pypi/django","source":"PYSEC-2025-108"},{"ecosystem":"PyPI","fixed":["5.1.14"],"introduced":["5.0a1"],"last_affected":[],"package":"django","purl":null,"source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"PyPI","fixed":["5.1.14"],"introduced":["5.0a1"],"last_affected":[],"package":"django","purl":"pkg:pypi/django","source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"PyPI","fixed":["5.2.8"],"introduced":["5.2a1"],"last_affected":[],"package":"django","purl":null,"source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"PyPI","fixed":["5.2.8"],"introduced":["5.2a1"],"last_affected":[],"package":"django","purl":"pkg:pypi/django","source":"GHSA-frmv-pr5f-9mcr"},{"ecosystem":"Red Hat:ansible_automation_platform:2.6::el9","fixed":["0:4.7.6-1.el9ap"],"introduced":["0"],"last_affected":[],"package":"automation-controller-venv-tower","purl":"pkg:rpm/redhat/automation-controller-venv-tower","source":"RHSA-2025:23070"},{"ecosystem":"Red Hat:ansible_automation_platform:2.6::el9","fixed":["0:4.2.26-2.el9ap"],"introduced":["0"],"last_affected":[],"package":"python3.11-django","purl":"pkg:rpm/redhat/python3.11-django","source":"RHSA-2025:23070"},{"ecosystem":"Red Hat:ansible_automation_platform_developer:2.6::el9","fixed":["0:4.2.26-2.el9ap"],"introduced":["0"],"last_affected":[],"package":"python3.11-django","purl":"pkg:rpm/redhat/python3.11-django","source":"RHSA-2025:23070"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["5.2.8-1.1"],"introduced":["0"],"last_affected":[],"package":"python-Django","purl":"pkg:rpm/opensuse/python-Django\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15712-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["4.2.26-1.1"],"introduced":["0"],"last_affected":[],"package":"python-Django4","purl":"pkg:rpm/opensuse/python-Django4\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15708-1"}],"prev":{"headline":"Potential denial-of-service vulnerability in HttpResponseRedirect and HttpResponsePermanentRedirect on Windows","id":"CVE-2025-64458"},"products":["Django"],"published":"2025-11-05","related":[{"cvss_score":9.8,"headline":"Privilege abuse in GenericInlineModelAdmin","id":"CVE-2026-4277","kev_date_added":null,"published":"2026-04-07"},{"cvss_score":9.8,"headline":"Django SQL injection in HasKey(lhs, rhs) on Oracle","id":"CVE-2024-53908","kev_date_added":null,"published":"2024-12-06"},{"cvss_score":9.8,"headline":"Django SQL injection vulnerability","id":"CVE-2024-42005","kev_date_added":null,"published":"2024-08-07"},{"cvss_score":9.8,"headline":"Django bypasses validation when using one form field to upload multiple files","id":"CVE-2023-31047","kev_date_added":null,"published":"2023-05-07"},{"cvss_score":9.8,"headline":"Django `Trunc()` and `Extract()` database functions vulnerable to SQL Injection","id":"CVE-2022-34265","kev_date_added":null,"published":"2022-07-04"},{"cvss_score":9.8,"headline":"SQL Injection in Django","id":"CVE-2021-35042","kev_date_added":null,"published":"2021-07-02"},{"cvss_score":9.8,"headline":"SQL injection in Django","id":"CVE-2020-7471","kev_date_added":null,"published":"2020-02-03"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-02-26","vendors":["djangoproject"]},"summary":"Attackers can execute arbitrary SQL commands via crafted dictionary arguments in Django QuerySet and Q objects, potentially reading or modifying database contents.","url":"https://insights.sbomify.com/CVE-2025-64459/"}