CVE-2024-22513: Djangorestframework simplejwt Improper Privilege Management Vulnerability
LOWCVE-2024-22513 is a LOW improper privilege management vulnerability (CWE-269: Improper Privilege Management) affecting Djangorestframework simplejwt libraries in the PyPI ecosystem. The issue involves improper privilege management in djangorestframework-simplejwt. Remediation is available by upgrading affected packages to version 5.5.1.
CVE-2024-22513 at a Glance
How to Fix CVE-2024-22513
To remediate this vulnerability, upgrade all affected Djangorestframework simplejwt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install djangorestframework-simplejwt>=5.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show djangorestframework-simplejwt
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-22513, inspect your installed packages using pip:
pip show djangorestframework-simplejwt
Analyze the terminal output to locate any version of Djangorestframework simplejwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.1), your application is affected.
Note: The pip show djangorestframework-simplejwt command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Djangorestframework simplejwt, 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
CVE-2024-22513 Affected Djangorestframework simplejwt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
djangorestframework-simplejwt
|
PyPI |
< 5.5.1
|
5.5.1
|
References
Frequently Asked Questions
What is CVE-2024-22513?
Which Djangorestframework simplejwt versions are affected?
What version fixes CVE-2024-22513?
Is djangorestframework-simplejwt affected?
What CWE is associated with CVE-2024-22513?
How can I check PyPI dependencies for CVE-2024-22513?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5vcc-86wm-547q",
"modified" : "2025-09-02T15:26:12Z",
"published" : "2024-03-16T09:30:35Z",
"aliases" : [ "CVE-2024-22513" ],
"summary" : "Improper Privilege Management in djangorestframework-simplejwt",
"details" : "djangorestframework-simplejwt before version 5.5.1 is vulnerable to information disclosure. A user can access web application resources even after their account has been disabled due to missing user validation checks via the for_user method.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "djangorestframework-simplejwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22513"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/issues/779"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/pull/872"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/pull/873"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/pull/891"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/commit/14e8b2cf5fa0df954af82ff3926fa6d6c4ecf13e"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/commit/1ad763bfe73936515aa4756263338c63866364c9"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/commit/a2d0a0201b6123536ecf76cd4d0ec7389317d0a7"
}, {
"type" : "WEB",
"url" : "https://github.com/dmdhrumilmistry/CVEs/tree/main/CVE-2024-22513"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt"
}, {
"type" : "WEB",
"url" : "https://github.com/jazzband/djangorestframework-simplejwt/blob/c791e987332ed5e22a86428160d6372b1d85ffae/rest_framework_simplejwt/tokens.py#L281"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-18T20:37:23Z",
"nvd_published_at" : "2024-03-16T07:15:06Z"
}
}