Vulnerabilities in pkg:pypi/dockerspawner

PACKAGE
Advisory Identifier: GHSA-hfgr-h3vc-p6c2
Advisory Summary

CVE-2023-48311 is a MODERATE (CVSS 4.3) dockerspawner allows any image by vulnerability (CWE-20: Improper Input Validation) affecting Dockerspawner libraries in the PyPI ecosystem. The issue involves dockerspawner allows any image by default. Remediation is available by upgrading affected packages to version 13.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/dockerspawner

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-hfgr-h3vc-p6c2 CVE-2023-48311 MODERATE DockerSpawner allows any image by default

CVE-2023-48311 at a Glance

CVE Identifier CVE-2023-48311
GHSA Identifier GHSA-hfgr-h3vc-p6c2
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Dockerspawner
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.3

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:N/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 None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-48311

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

dockerspawner fixed: 13.0.0
pip install dockerspawner>=13.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 dockerspawner

How to Check if You Are Affected

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

pip show dockerspawner

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Dockerspawner, 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 JupyterHub deployments running DockerSpawner starting with 0.11.0 without specifying `DockerSpawner.allowed_images` configuration allow users to launch _any_ pullable image, instead of restricting to only the single configured image, as intended. ### Patches Upgrade to DockerSpawner 13. ### Workarounds Explicitly setting `DockerSpawner.allowed_images` to a non-empty list containing only the default image will result in the intended default behavior: ```python c.DockerSpawner.image = "your-image" c.DockerSpawner.allowed_images = ["your-image"] ```

CVE-2023-48311 Affected Dockerspawner Versions

1 component(s)
Fixed Versions:
13.0.0
Product / Package Ecosystem Affected Versions Fixed Version
dockerspawner
PyPI
≥ 0.11.0
< 13.0.0
13.0.0

References

Frequently Asked Questions

What is CVE-2023-48311?
CVE-2023-48311 is a security vulnerability in Dockerspawner involving DockerSpawner allows any image by default under CWE-20: Improper Input Validation.
Which Dockerspawner versions are affected?
Affected versions include releases prior to 13.0.0 across affected packages: dockerspawner.
What version fixes CVE-2023-48311?
Upgrading to 13.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dockerspawner affected?
Yes, dockerspawner is affected in releases prior to 13.0.0. Upgrade your dependency to 13.0.0 or later.
What is the CVSS score of CVE-2023-48311?
CVE-2023-48311 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-48311?
CVE-2023-48311 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2023-48311?
Run the dependency tree command: 'pip show dockerspawner'. 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-hfgr-h3vc-p6c2",
  "modified" : "2023-12-13T21:34:38Z",
  "published" : "2023-12-08T14:42:55Z",
  "aliases" : [ "CVE-2023-48311" ],
  "summary" : "DockerSpawner allows any image by default",
  "details" : "### Impact\n\nUsers of JupyterHub deployments running DockerSpawner starting with 0.11.0 without specifying `DockerSpawner.allowed_images` configuration allow users to launch _any_ pullable image, instead of restricting to only the single configured image, as intended.\n\n### Patches\n\nUpgrade to DockerSpawner 13.\n\n### Workarounds\n\nExplicitly setting `DockerSpawner.allowed_images` to a non-empty list containing only the default image will result in the intended default behavior:\n\n```python\nc.DockerSpawner.image = \"your-image\"\nc.DockerSpawner.allowed_images = [\"your-image\"]\n```\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "dockerspawner"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.11.0"
      }, {
        "fixed" : "13.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/dockerspawner/security/advisories/GHSA-hfgr-h3vc-p6c2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-48311"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterhub/dockerspawner/commit/3ba4b665b6ca6027ea7a032d7ca3eab977574626"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyterhub/dockerspawner"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-08T14:42:55Z",
    "nvd_published_at" : "2023-12-08T20:15:07Z"
  }
}