Possible pod name collisions in jupyterhub-kubespawner
Impact
What kind of vulnerability is it? Who is impacted?
JupyterHub deployments using:
- KubeSpawner <= 0.11.1 (e.g. zero-to-jupyterhub 0.9.0) and
- enabled named_servers (not default), and
- an Authenticator that allows:
- usernames with hyphens or other characters that require escape (e.g.
user-hyphenoruser@email), and - usernames which may match other usernames up to but not including the escaped character (e.g.
userin the above cases)
- usernames with hyphens or other characters that require escape (e.g.
In this circumstance, certain usernames will be able to craft particular server names which will grant them access to the default server of other users who have matching usernames.
Patches
Has the problem been patched? What versions should users upgrade to?
Patch will be released in kubespawner 0.12 and zero-to-jupyterhub 0.9.1
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
KubeSpawner
Specify configuration:
for KubeSpawner
from traitlets import default
from kubespawner import KubeSpawner
class PatchedKubeSpawner(KubeSpawner):
@default("pod_name_template")
def _default_pod_name_template(self):
if self.name:
return "jupyter-{username}-{servername}"
else:
return "jupyter-{username}"
@default("pvc_name_template")
def _default_pvc_name_template(self):
if self.name:
return "claim-{username}-{servername}"
else:
return "claim-{username}"
c.JupyterHub.spawner_class = PatchedKubeSpawner
Note for KubeSpawner: this configuration will behave differently before and after the upgrade, so will need to be removed when upgrading. Only apply this configuration while still using KubeSpawner ≤ 0.11.1 and remove it after upgrade to ensure consistent pod and pvc naming.
Changing the name template means pvcs for named servers will have different names. This will result in orphaned PVCs for named servers across Hub upgrade! This may appear as data loss for users, depending on configuration, but the orphaned PVCs will still be around and data can be migrated manually (or new PVCs created manually to reference existing PVs) before deleting the old PVCs and/or PVs.
References
Are there any links users can visit to find out more?
For more information
If you have any questions or comments about this advisory:
- Open an issue in kubespawner
- Email us at security@ipython.org
Credit: Jining Huang
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | jupyterhub-kubespawner | < 0.12.0 | 0.12.0 |
Referencias
- https://github.com/jupyterhub/kubespawner/security/advisories/GHSA-v7m9-9497-p9gr
- https://github.com/jupyterhub/kubespawner/commit/3dfe870a7f5e98e2e398b01996ca6b8eff4bb1d0
- https://nvd.nist.gov/vuln/detail/CVE-2020-15110
- https://github.com/jupyterhub/kubespawner
- https://github.com/pypa/advisory-database/tree/main/vulns/jupyterhub-kubespawner/PYSEC-2020-51.yaml
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N- Debilidad (CWE)
CWE-863- Plataforma
- Python (PyPI)
- Paquete
jupyterhub-kubespawner- Publicada
- 17.07.2020
- Actualizado
- 11.10.2026 13:19
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2020-51 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-v7m9-9497-p9gr - CC BY 4.0
Historial de vulnerabilidades: jupyterhub-kubespawner
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
Esta es la única vulnerabilidad conocida de este paquete.
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.