CVE-2021-41247: Jupyterhub Incomplete JupyterHub Logout With Simultaneous Vulnerability

MODERATE
Advisory Identifier: GHSA-cw7p-q79f-m2v7
CVSS 3.5
CWE-613
Published
Advisory Summary

CVE-2021-41247 is a MODERATE (CVSS 3.5) incomplete jupyterhub logout with simultaneous vulnerability (CWE-613: Insufficient Session Expiration) affecting Jupyterhub libraries in the PyPI ecosystem. The issue involves incomplete jupyterhub logout with simultaneous jupyterlab sessions. Remediation is available by upgrading affected packages to version 1.5.0.

CVE-2021-41247 at a Glance

CVE Identifier CVE-2021-41247
GHSA Identifier GHSA-cw7p-q79f-m2v7
Severity MODERATE
CVSS v3.1 Base Score 3.5
CWE Classification CWE-613: Insufficient Session Expiration
Affected Product Jupyterhub
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.5

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

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

How to Fix CVE-2021-41247

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

jupyterhub fixed: 1.5.0
pip install jupyterhub>=1.5.0
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 jupyterhub

How to Check if You Are Affected

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

pip show jupyterhub

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-613: Insufficient Session Expiration, where according to wasc, "insufficient session expiration is when a web site permits an attacker to reuse old session credentials or session ids for authorization.". In Jupyterhub, 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 Users of JupyterLab with JupyterHub who have multiple JupyterLab tabs open in the same browser session, may see incomplete logout from the single-user server, as fresh credentials (for the single-user server only, not the Hub) reinstated after logout, if another active JupyterLab session is open while the logout takes place. ### Patches Upgrade to JupyterHub 1.5. For distributed deployments, it is jupyterhub in the _user_ environment that needs patching. There are no patches necessary in the Hub environment. ### Workarounds The only workaround is to make sure that only one JupyterLab tab is open when you log out.

CVE-2021-41247 Affected Jupyterhub Versions

1 component(s)
Fixed Versions:
1.5.0
Product / Package Ecosystem Affected Versions Fixed Version
jupyterhub
PyPI
≥ 1.0.0
< 1.5.0
1.5.0

References

Frequently Asked Questions

What is CVE-2021-41247?
CVE-2021-41247 is a security vulnerability in Jupyterhub involving incomplete JupyterHub logout with simultaneous JupyterLab sessions under CWE-613: Insufficient Session Expiration.
Which Jupyterhub versions are affected?
Affected versions include releases prior to 1.5.0 across affected packages: jupyterhub.
What version fixes CVE-2021-41247?
Upgrading to 1.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyterhub affected?
Yes, jupyterhub is affected in releases prior to 1.5.0. Upgrade your dependency to 1.5.0 or later.
What is the CVSS score of CVE-2021-41247?
CVE-2021-41247 has a CVSS v3.1 base score of 3.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2021-41247?
CVE-2021-41247 is classified under CWE-613: Insufficient Session Expiration (According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization.").
How can I check PyPI dependencies for CVE-2021-41247?
Run the dependency tree command: 'pip show jupyterhub'. 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-cw7p-q79f-m2v7",
  "modified" : "2024-09-24T20:50:54Z",
  "published" : "2021-11-08T18:02:37Z",
  "aliases" : [ "CVE-2021-41247" ],
  "summary" : "incomplete JupyterHub logout with simultaneous JupyterLab sessions",
  "details" : "### Impact\n\nUsers of JupyterLab with JupyterHub who have multiple JupyterLab tabs open in the same browser session, may see incomplete logout from the single-user server, as fresh credentials (for the single-user server only, not the Hub) reinstated after logout, if another active JupyterLab session is open while the logout takes place.\n\n### Patches\n\nUpgrade to JupyterHub 1.5. For distributed deployments, it is jupyterhub in the _user_ environment that needs patching. There are no patches necessary in the Hub environment.\n\n### Workarounds\n\nThe only workaround is to make sure that only one JupyterLab tab is open when you log out.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterhub"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-cw7p-q79f-m2v7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41247"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/jupyterhub/commit/5ac9e7f73a6e1020ffddc40321fc53336829fe27"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyterhub/jupyterhub"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyterhub/PYSEC-2021-386.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-613" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-04T17:49:19Z",
    "nvd_published_at" : "2021-11-04T18:15:00Z"
  }
}