PYSEC-2026-1480
Cross site scripting (XSS) in JupyterHub via Self-XSS leveraged by Cookie Tossing
At a glance
- Published
- Updated
- CVE
- CVE-2024-28233
- Aliases
- BIT-jupyterhub-2024-28233, GHSA-7r3h-4ph8-w38g
- CVSS_V3
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Description
### Impact Affected configurations: - Single-origin JupyterHub deployments - JupyterHub deployments with user-controlled applications running on subdomains or peer subdomains of either the Hub or a single-user server. By tricking a user into visiting a malicious subdomain, the attacker can achieve an XSS directly affecting the former's session. More precisely, in the context of JupyterHub, this XSS could achieve the following: - Full access to JupyterHub API and user's single-user server, e.g. - Create and exfiltrate an API Token - Exfiltrate all files hosted on the user's single-user server: notebooks, images, etc. - Install malicious extensions. They can be used as a backdoor to silently regain access to victim's session anytime. ### Patches To prevent cookie-tossing: - Upgrade to JupyterHub 4.1 (both hub and user environment) - enable per-user domains via `c.JupyterHub.subdomain_host = "https://mydomain.example.org"` - set `c.JupyterHub.cookie_host_prefix_enabled = True` to enable domain-locked cookies or, if available (applies to earlier JupyterHub versions): - deploy jupyterhub on its own domain, not shared with any other services - enable per-user domains via `c.JupyterHub.subdomain_host = "https://mydomain.example.org"`
Affected packages
| Package | Versions |
|---|---|
| PyPI · jupyterhub | introduced 0, fixed 4.1.0 |
References
- https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-7r3h-4ph8-w38g WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-28233 ADVISORY
- https://github.com/jupyterhub/jupyterhub/commit/e2798a088f5ad45340fe79cdf1386198e664f77f FIX
- https://github.com/jupyterhub/jupyterhub PACKAGE
- https://pypi.org/project/jupyterhub PACKAGE
- https://github.com/advisories/GHSA-7r3h-4ph8-w38g ADVISORY
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — PyPA Advisory Database |