Vulnerabilities in pkg:pypi/jupyterhub-firstuseauthenticator

PACKAGE
Advisory Identifier: GHSA-5xvc-vgmp-jgc3
Advisory Summary

CVE-2021-41194 is a CRITICAL (CVSS 9.1) improper access control vulnerability (CWE-284: Improper Access Control) affecting Jupyterhub firstuseauthenticator libraries in the PyPI ecosystem. The issue involves improper access control in jupyterhub-firstuseauthenticator. Remediation is available by upgrading affected packages to version 1.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/jupyterhub-firstuseauthenticator

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-5xvc-vgmp-jgc3 CVE-2021-41194 CRITICAL Improper Access Control in jupyterhub-firstuseauthenticator

CVE-2021-41194 at a Glance

CVE Identifier CVE-2021-41194
GHSA Identifier GHSA-5xvc-vgmp-jgc3
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-284: Improper Access Control
Affected Product Jupyterhub firstuseauthenticator
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-2021-41194

To remediate this vulnerability, upgrade all affected Jupyterhub firstuseauthenticator 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-firstuseauthenticator fixed: 1.0.0
pip install jupyterhub-firstuseauthenticator>=1.0.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-firstuseauthenticator

How to Check if You Are Affected

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

pip show jupyterhub-firstuseauthenticator

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Jupyterhub firstuseauthenticator, 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 When JupyterHub is used with FirstUseAuthenticator, the vulnerability allows unauthorized access to any user's account if `create_users=True` and the username is known or guessed. ### Patches Upgrade to jupyterhub-firstuseauthenticator to 1.0, or apply patch https://github.com/jupyterhub/firstuseauthenticator/pull/38.patch ### Workarounds If you cannot upgrade, there is no complete workaround, but it can be mitigated. If you cannot upgrade yet, you can disable user creation with `c.FirstUseAuthenticator.create_users = False`, which will only allow login with fully normalized usernames for already existing users prior to jupyterhub-firstuserauthenticator 1.0. If any users have never logged in with their normalized username (i.e. lowercase), they will still be vulnerable until you can patch or upgrade.

CVE-2021-41194 Affected Jupyterhub firstuseauthenticator Versions

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

References

Frequently Asked Questions

What is CVE-2021-41194?
CVE-2021-41194 is a security vulnerability in Jupyterhub firstuseauthenticator involving Improper Access Control in jupyterhub-firstuseauthenticator under CWE-284: Improper Access Control.
Which Jupyterhub firstuseauthenticator versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: jupyterhub-firstuseauthenticator.
What version fixes CVE-2021-41194?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyterhub-firstuseauthenticator affected?
Yes, jupyterhub-firstuseauthenticator is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
What is the CVSS score of CVE-2021-41194?
CVE-2021-41194 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-2021-41194?
CVE-2021-41194 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check PyPI dependencies for CVE-2021-41194?
Run the dependency tree command: 'pip show jupyterhub-firstuseauthenticator'. 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-5xvc-vgmp-jgc3",
  "modified" : "2024-09-24T21:11:48Z",
  "published" : "2021-10-28T23:13:57Z",
  "aliases" : [ "CVE-2021-41194" ],
  "summary" : "Improper Access Control in jupyterhub-firstuseauthenticator",
  "details" : "### Impact\n\nWhen JupyterHub is used with FirstUseAuthenticator, the vulnerability allows unauthorized access to any user's account if `create_users=True` and the username is known or guessed.\n\n### Patches\n\nUpgrade to jupyterhub-firstuseauthenticator to 1.0, or apply patch https://github.com/jupyterhub/firstuseauthenticator/pull/38.patch\n\n### Workarounds\n\nIf you cannot upgrade, there is no complete workaround, but it can be mitigated.\n\nIf you cannot upgrade yet, you can disable user creation with `c.FirstUseAuthenticator.create_users = False`, which will only allow login with fully normalized usernames for already existing users prior to jupyterhub-firstuserauthenticator 1.0. If any users have never logged in with their normalized username (i.e. lowercase), they will still be vulnerable until you can patch or upgrade.",
  "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" : "jupyterhub-firstuseauthenticator"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/security/advisories/GHSA-5xvc-vgmp-jgc3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41194"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/pull/38"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/pull/38.patch"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/pull/38/commits/32b21898fb2b53b1a2e36270de6854ad70e9e9bf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/pull/38/commits/9e200d974e0cb85d828a6afedb8ab90a37878f28"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator/commit/953418e2450dbc2d854e332350849533b0ebc7ba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyterhub/firstuseauthenticator"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyterhub-firstuseauthenticator/PYSEC-2021-384.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-28T16:52:16Z",
    "nvd_published_at" : "2021-10-28T20:15:00Z"
  }
}