{"id":"CVE-2021-35042","aliases":["CVE-2021-35042","GHSA-xpfp-f569-q3p2","BIT-DJANGO-2021-35042","PYSEC-2021-109"],"related":[],"kind":"vulnerability","state":"published","title":"SQL Injection in Django","summary":"Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input from a client of a web application.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input from a client of a web application.","source":"cvelist"},{"lang":"es","text":"Django versiones 3.1.x anteriores a 3.1.13 y  versiones 3.2.x anteriores a 3.2.5, permiten la inyección SQL de la función QuerySet.order_by si el parámetro order_by es una entrada no fiable de un cliente de una aplicación web","source":"nvd"}],"published":"2021-07-02T09:54:11.000Z","modified":"2026-09-08T08:46:26.608Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.2a1","status":"affected","fixed":"3.2.5"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0a1","status":"affected","fixed":"3.1.13"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.1","fixed":"3.1.13"},{"status":"affected","introduced":"3.2","fixed":"3.2.5"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"3.1","status":"affected","fixed":"3.1.13"},{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.5"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"3.1.0","status":"affected","fixed":"3.1.13"},{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"3.2.5"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["web","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security/","tags":["advisory","patch","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://www.openwall.com/lists/oss-security/2021/07/02/2","tags":["advisory","mailing-list","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2021/jul/01/security-releases/","tags":["advisory","article","patch","vendor-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20210805-0008/","tags":["advisory","third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y/","tags":["vendor-advisory","web","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-35042","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/0bd57a879a0d54920bb9038a732645fb917040e9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/a34a5f724c5d5adb2109374ba3989ebb7b11f81f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/dae83a24519d6f284c74414e0b81d64d9b5a0db4","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-xpfp-f569-q3p2","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-109.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20210805-0008","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2021/jul/01/security-releases","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-35042","url":"https://www.cve.org/CVERecord?id=CVE-2021-35042","licence":"CVE Terms of Use","modified":"2024-08-04T00:33:49.895Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xpfp-f569-q3p2","url":"https://github.com/advisories/GHSA-xpfp-f569-q3p2","licence":"CC-BY-4.0","modified":"2025-02-21T05:30:56.014Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-35042","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-35042","licence":"Public domain","modified":"2026-06-17T03:57:01.887Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-109","url":"https://osv.dev/vulnerability/PYSEC-2021-109","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:17.903Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2021-35042","url":"https://osv.dev/vulnerability/BIT-DJANGO-2021-35042","licence":"Apache-2.0","modified":"2026-09-08T08:46:26.608Z"}],"updatedAt":"2026-11-25T22:58:02.416Z","epss":{"score":0.44369,"percentile":0.98786,"date":"2026-12-01T12:00:22.000Z"}}