An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.
FilteredRelation is subject to SQL injection in column aliases via control characters, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed to QuerySet methods annotate(), aggregate(), extra(), values(), values_list(), and alias().
Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
Django would like to thank Solomon Kebede for reporting this issue.
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Django | Djangoproject | 4.2 (including) | 4.2.28 (excluding) |
| Django | Djangoproject | 5.2 (including) | 5.2.11 (excluding) |
| Django | Djangoproject | 6.0 (including) | 6.0.2 (excluding) |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | RedHat | python3.12-django-0:4.2.28-1.el8ap | * |
| Red Hat Ansible Automation Platform 2.5 for RHEL 9 | RedHat | python3.12-django-0:4.2.28-1.el9ap | * |
| Red Hat Ansible Automation Platform 2.6 for RHEL 9 | RedHat | python3.12-django-0:4.2.28-1.el9ap | * |
| Red Hat Satellite 6.16 for RHEL 8 | RedHat | python-django-0:4.2.28-0.1.el8pc | * |
| Red Hat Satellite 6.16 for RHEL 8 | RedHat | python-django-0:4.2.28-0.1.el8pc | * |
| Red Hat Satellite 6.16 for RHEL 9 | RedHat | python-django-0:4.2.28-0.1.el9pc | * |
| Red Hat Satellite 6.16 for RHEL 9 | RedHat | python-django-0:4.2.28-0.1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | foreman-0:3.14.0.14-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | libcomps-0:0.1.23-0.3.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-brotli-0:1.2.0-0.1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-django-0:4.2.28-0.1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-pulp-container-0:2.22.3-1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-pulp-rpm-0:3.27.10-2.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-fog-kubevirt-0:1.5.1-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-foreman_kubevirt-0:0.4.3-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-katello-0:4.16.0.14-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-rubyipmi-0:0.13.0-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | satellite-0:6.17.7-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | yggdrasil-worker-forwarder-0:0.0.3-4.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | foreman-0:3.14.0.14-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | libcomps-0:0.1.23-0.3.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-brotli-0:1.2.0-0.1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-django-0:4.2.28-0.1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-pulp-container-0:2.22.3-1.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | python-pulp-rpm-0:3.27.10-2.el9pc | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-fog-kubevirt-0:1.5.1-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-foreman_kubevirt-0:0.4.3-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-katello-0:4.16.0.14-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | rubygem-rubyipmi-0:0.13.0-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | satellite-0:6.17.7-1.el9sat | * |
| Red Hat Satellite 6.17 for RHEL 9 | RedHat | yggdrasil-worker-forwarder-0:0.0.3-4.el9sat | * |
| Red Hat Satellite 6.18 for RHEL 9 | RedHat | python3.12-django-0:4.2.30-1.el9pc | * |
| Red Hat Satellite 6.18 for RHEL 9 | RedHat | python3.12-django-0:4.2.30-1.el9pc | * |
| Red Hat Ansible Automation Platform 2.5 | RedHat | ansible-automation-platform-25/lightspeed-rhel8:1772214630 | * |
| Red Hat Ansible Automation Platform 2.6 | RedHat | ansible-automation-platform-26/lightspeed-rhel9:1772552788 | * |
| Red Hat Discovery 2 | RedHat | discovery/discovery-server-rhel9:1770913597 | * |
| Red Hat Satellite 6.18 | RedHat | satellite/iop-advisor-backend-rhel9:1773451075 | * |
| Python-django | Ubuntu | devel | * |
| Python-django | Ubuntu | esm-infra-legacy/trusty | * |
| Python-django | Ubuntu | esm-infra-legacy/xenial | * |
| Python-django | Ubuntu | esm-infra/bionic | * |
| Python-django | Ubuntu | esm-infra/focal | * |
| Python-django | Ubuntu | esm-infra/xenial | * |
| Python-django | Ubuntu | jammy | * |
| Python-django | Ubuntu | noble | * |
| Python-django | Ubuntu | questing | * |
| Python-django | Ubuntu | resolute | * |
| Python-django | Ubuntu | upstream | * |