Related Vulnerabilities: CVE-2022-28347  

A SQL injection issue was discovered in QuerySet.explain() in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. This occurs by passing a crafted dictionary (with dictionary expansion) as the **options argument, and placing the injection payload in an option name.

Description

The MITRE CVE dictionary describes this issue as:

A SQL injection issue was discovered in QuerySet.explain() in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. This occurs by passing a crafted dictionary (with dictionary expansion) as the **options argument, and placing the injection payload in an option name.

Additional Information

  • Bugzilla 2072459: CVE-2022-28347 Django: Potential SQL injection via QuerySet.explain(options) on PostgreSQL
  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • FAQ: Frequently asked questions about CVE-2022-28347