Skip to content

Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking

High severity GitHub Reviewed Published May 26, 2025 in codingjoe/django-select2

Package

pip django-select2 (pip)

Affected versions

< 8.4.1

Patched versions

8.4.1

Description

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.

References

@codingjoe codingjoe published to codingjoe/django-select2 May 26, 2025
Published by the National Vulnerability Database May 27, 2025
Published to the GitHub Advisory Database May 27, 2025
Reviewed May 27, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(7th percentile)

CVE ID

CVE-2025-48383

GHSA ID

GHSA-wjrh-hj83-3wh7

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.