QID 375743

Date Published: 2021-07-29

QID 375743: Django Framework SQL Injection Vulnerability

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. It is maintained by the Django Software Foundation

Unsanitized user input passed to QuerySet.order_by() could bypass intended column reference validation in path marked for deprecation resulting in a potential SQL injection even if a deprecation warning is emitted.

Affected Versions:
Django 3.1- 3.1.12
Django 3.2-3.2.4

QID Detection Logic:(Authenticated)
This QID checks for vulnerable Django version with pip list command.

A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as High - 7.5 severity.
  • Solution
    Customers are advised to upgrade to Django 3.1.13, 3.2.5 or latest versions. For more information, please visit: Django Security Release.
    Vendor References

    CVEs related to QID 375743

    Software Advisories
    Advisory ID Software Component Link
    Django Security Advisory URL Logo www.djangoproject.com/weblog/2021/jul/01/security-releases/