Vulnerabilities in pkg:pypi/django-select2

PACKAGE
Advisory Identifier: GHSA-wjrh-hj83-3wh7
Advisory Summary

CVE-2025-48383 is a HIGH (CVSS 8.2) django-select2 vulnerable to widget instance vulnerability (CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak')) affecting Django select2 libraries in the PyPI ecosystem. The issue involves django-select2 vulnerable to widget instance secret cache key leaking. Remediation is available by upgrading affected packages to version 8.4.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/django-select2

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/django-select2. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-wjrh-hj83-3wh7 CVE-2025-48383 HIGH Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking

CVE-2025-48383 at a Glance

CVE Identifier CVE-2025-48383
GHSA Identifier GHSA-wjrh-hj83-3wh7
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak')
Affected Product Django select2
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-48383

To remediate this vulnerability, upgrade all affected Django select2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

django-select2 fixed: 8.4.1
pip install django-select2>=8.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show django-select2

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-48383, inspect your installed packages using pip:

pip show django-select2

Analyze the terminal output to locate any version of Django select2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.4.1), your application is affected.

Note: The pip show django-select2 command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak'), where the product makes resources available to untrusted parties when those resources are only intended to be accessed by the product. In Django select2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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: ```python 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: ```python 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.

CVE-2025-48383 Affected Django select2 Versions

1 component(s)
Fixed Versions:
8.4.1
Product / Package Ecosystem Affected Versions Fixed Version
django-select2
PyPI
< 8.4.1
8.4.1

References

Frequently Asked Questions

What is CVE-2025-48383?
CVE-2025-48383 is a security vulnerability in Django select2 involving Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking under CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak').
Which Django select2 versions are affected?
Affected versions include releases prior to 8.4.1 across affected packages: django-select2.
What version fixes CVE-2025-48383?
Upgrading to 8.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is django-select2 affected?
Yes, django-select2 is affected in releases prior to 8.4.1. Upgrade your dependency to 8.4.1 or later.
What is the CVSS score of CVE-2025-48383?
CVE-2025-48383 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2025-48383?
CVE-2025-48383 is classified under CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak') (The product makes resources available to untrusted parties when those resources are only intended to be accessed by the product.).
How can I check PyPI dependencies for CVE-2025-48383?
Run the dependency tree command: 'pip show django-select2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wjrh-hj83-3wh7",
  "modified" : "2025-05-27T18:03:19Z",
  "published" : "2025-05-27T18:03:19Z",
  "aliases" : [ "CVE-2025-48383" ],
  "summary" : "Django-Select2 Vulnerable to Widget Instance Secret Cache Key Leaking",
  "details" : "### Impact\n\nInstances 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.\n\n### Patches\n\nThe problem has been patched in version 8.4.1 and all following versions.\n\n### Workarounds\n\nThis vulnerability is limited use cases where instances of widget classes are created during app loading (not during a request).\n\nExample of affected code:\n```python\nclass MyForm(forms.ModelForm):\n    class Meta:\n        widgets = {\"my_select_field\": Select2ModelWidget()}\n```\n\nDjango allows you to pass just the widget class (not the instance). This can be used to mitigate the session request leak.\n\nExample of affected code:\n```python\nclass MyForm(forms.ModelForm):\n    class Meta:\n        widgets = {\"my_select_field\": Select2ModelWidget}\n```\n\n\n\n### References\n\nThanks 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" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-select2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.4.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codingjoe/django-select2/security/advisories/GHSA-wjrh-hj83-3wh7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48383"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/codingjoe/django-select2/commit/e5f41e6edba004d35f94915ff5e2559f44853412"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codingjoe/django-select2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-402", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-27T18:03:19Z",
    "nvd_published_at" : "2025-05-27T15:15:35Z"
  }
}