CVE-2020-10594: Drf jwt Django Rest Framework Jwt Allows Vulnerability

CRITICAL
Advisory Identifier: GHSA-fpjm-rp2g-3r4c
CVSS 9.1
CWE-287
Published
Advisory Summary

CVE-2020-10594 is a CRITICAL (CVSS 9.1) django rest framework jwt allows vulnerability (CWE-287: Improper Authentication) affecting Drf jwt libraries in the PyPI ecosystem. The issue involves django rest framework jwt allows obtaining new token from notionally invalidated token. Remediation is available by upgrading affected packages to version 1.15.1.

CVE-2020-10594 at a Glance

CVE Identifier CVE-2020-10594
GHSA Identifier GHSA-fpjm-rp2g-3r4c
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-287: Improper Authentication
Affected Product Drf jwt
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

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:H/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 High (I:H)
Availability None (A:N)

How to Fix CVE-2020-10594

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

drf-jwt fixed: 1.15.1
pip install drf-jwt>=1.15.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 drf-jwt

How to Check if You Are Affected

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

pip show drf-jwt

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Drf jwt, 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

An issue was discovered in drf-jwt 1.15.x before 1.15.1. It allows attackers with access to a notionally invalidated token to obtain a new, working token via the refresh endpoint, because the blacklist protection mechanism is incompatible with the token-refresh feature. NOTE: drf-jwt is a fork of jpadilla/django-rest-framework-jwt, which is unmaintained.

CVE-2020-10594 Affected Drf jwt Versions

1 component(s)
Fixed Versions:
1.15.1
Product / Package Ecosystem Affected Versions Fixed Version
drf-jwt
PyPI
≥ 1.15.0
< 1.15.1
1.15.1

References

Frequently Asked Questions

What is CVE-2020-10594?
CVE-2020-10594 is a security vulnerability in Drf jwt involving Django Rest Framework jwt allows obtaining new token from notionally invalidated token under CWE-287: Improper Authentication.
Which Drf jwt versions are affected?
Affected versions include releases prior to 1.15.1 across affected packages: drf-jwt.
What version fixes CVE-2020-10594?
Upgrading to 1.15.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is drf-jwt affected?
Yes, drf-jwt is affected in releases prior to 1.15.1. Upgrade your dependency to 1.15.1 or later.
What is the CVSS score of CVE-2020-10594?
CVE-2020-10594 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2020-10594?
CVE-2020-10594 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check PyPI dependencies for CVE-2020-10594?
Run the dependency tree command: 'pip show drf-jwt'. 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-fpjm-rp2g-3r4c",
  "modified" : "2024-09-20T17:05:27Z",
  "published" : "2020-06-05T16:09:34Z",
  "aliases" : [ "CVE-2020-10594" ],
  "summary" : "Django Rest Framework jwt allows obtaining new token from notionally invalidated token",
  "details" : "An issue was discovered in drf-jwt 1.15.x before 1.15.1. It allows attackers with access to a notionally invalidated token to obtain a new, working token via the refresh endpoint, because the blacklist protection mechanism is incompatible with the token-refresh feature. NOTE: drf-jwt is a fork of jpadilla/django-rest-framework-jwt, which is unmaintained.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "drf-jwt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.15.0"
      }, {
        "fixed" : "1.15.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-10594"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Styria-Digital/django-rest-framework-jwt/issues/36"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jpadilla/django-rest-framework-jwt/issues/484"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Styria-Digital/django-rest-framework-jwt/commit/868b5c22ddad59772b447080183e7c7101bb18e0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Styria-Digital/django-rest-framework-jwt"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-fpjm-rp2g-3r4c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/drf-jwt/PYSEC-2020-40.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/drf-jwt/1.15.1/#history"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-04T18:38:20Z",
    "nvd_published_at" : "2020-03-15T22:15:00Z"
  }
}