CVE-2025-48383: Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking
Impact Instances of HeavySelect2Mixin subclasses like the ModelSelect2MultipleWidget and ModelSelect2Widget can secret access tokens across requests. This can allow users to access restricted querysets and restricted data. Patches The problem has been patched in version 8.4.1 and all following versions.
Published May 27, 2025
Affected packages
django-select2
- Ecosystem
- PyPI
- Affected
- < 8.4.1
- Fixed in
- 8.4.1
- Check
pip show django-select2
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
Instances of HeavySelect2Mixin subclasses like the ModelSelect2MultipleWidget and ModelSelect2Widget can secret access tokens across requests. This can allow users to access restricted querysets and restricted data.
Patches
The problem has been patched in version 8.4.1 and all following versions.
Workarounds
This vulnerability is limited use cases where instances of widget classes are created during app loading (not during a request).
Example of affected code:
class MyForm(forms.ModelForm):
class Meta:
widgets = {"my_select_field": Select2ModelWidget()}Django allows you to pass just the widget class (not the instance). This can be used to mitigate the session request leak.
Example of affected code:
class MyForm(forms.ModelForm):
class Meta:
widgets = {"my_select_field": Select2ModelWidget}References
Thanks to @neartik for reporting this issue. I will address it later. I had to delete your issue, to avoid exploitation of this security issue.
Credited to neartik, ronanboiteau, codingjoe.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
