{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-35042","id":"CVE-2021-35042","title":"SQL Injection in Django","description":"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.","descriptionLong":"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.","published":"2021-07-02T09:54:11.000Z","updated":"2026-11-16T10:45:07.777830218Z","reserved":"2021-06-18T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"4.0","score":null,"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","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"django","purl":"pkg:pypi/django","ranges":[">=3.2a1 <3.2.5",">=3.0a1 <3.1.13",">=3.1 <3.1.13",">=3.2 <3.2.5"],"fixed":["3.2.5","3.1.13"],"advisory":"GHSA-xpfp-f569-q3p2"}],"cwes":["CWE-89"],"aliases":["BIT-django-2021-35042","GHSA-xpfp-f569-q3p2","PYSEC-2021-109"],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security/","tags":["x_refsource_MISC","x_transferred","Patch","Vendor Advisory","fix","web"]},{"url":"https://www.openwall.com/lists/oss-security/2021/07/02/2","tags":["x_refsource_CONFIRM","x_transferred","Mailing List","Patch","Third Party Advisory","fix","web"]},{"url":"https://www.djangoproject.com/weblog/2021/jul/01/security-releases/","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","fix","article"]},{"url":"https://security.netapp.com/advisory/ntap-20210805-0008/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-35042","tags":["advisory"]},{"url":"https://github.com/django/django/commit/0bd57a879a0d54920bb9038a732645fb917040e9","tags":["web"]},{"url":"https://github.com/django/django/commit/a34a5f724c5d5adb2109374ba3989ebb7b11f81f","tags":["web"]},{"url":"https://github.com/django/django/commit/dae83a24519d6f284c74414e0b81d64d9b5a0db4","tags":["web"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xpfp-f569-q3p2","tags":["advisory"]},{"url":"https://github.com/django/django","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-109.yaml","tags":["web"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SS6NJTBYWOX6J7G4U3LUOILARJKWPQ5Y","tags":["web"]},{"url":"https://security.netapp.com/advisory/ntap-20210805-0008","tags":["web"]},{"url":"https://www.djangoproject.com/weblog/2021/jul/01/security-releases","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.44369,"epssPercentile":0.98787,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-35042","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-35042","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-35042","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-xpfp-f569-q3p2","ok":true,"note":"GHSA-xpfp-f569-q3p2"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-35042","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["django"],"critical":["CVSS 9.8 in a widely used technology","EPSS 44% with CVSS 9.8"],"attention":null}