Advisory

PYSEC-2026-1300

Also known as: CVE-2025-48383, GHSA-wjrh-hj83-3wh7

Summary

Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking

Details

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.

Severity

High Basis: CVSS v3 score 8.2, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Dates

Published
2026-07-07 16:02 UTC
Modified
2026-07-07 17:46 UTC

Affected packages and fixes

django-select2

PyPI · All systems

Affected

  • introduced 0, fixed 8.4.1 (ecosystem)

Fixed versions

8.4.1

Fix

  • Fixed version 8.4.1
    pip install --upgrade django-select2==8.4.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences