{"id":"CVE-2024-28233","aliases":["GHSA-7r3h-4ph8-w38g","BIT-jupyterhub-2024-28233","PYSEC-2026-1480"],"title":"Cross site scripting (XSS) in JupyterHub via Self-XSS leveraged by Cookie Tossing","summary":"Cross site scripting (XSS) in JupyterHub via Self-XSS leveraged by Cookie Tossing","severity":"high","cvss":8.1,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","vendor":"jupyterhub","product":"jupyterhub","ecosystem":"pip","affected":["jupyterhub < 4.1.0"],"patched":["jupyterhub 4.1.0"],"published":"2024-03-28","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:50:00.245591053Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-7r3h-4ph8-w38g","references":[{"url":"https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-7r3h-4ph8-w38g"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28233"},{"url":"https://github.com/jupyterhub/jupyterhub/commit/e2798a088f5ad45340fe79cdf1386198e664f77f"},{"url":"https://github.com/jupyterhub/jupyterhub"}],"tags":["osv","pip"],"epss":0.00329,"epssPercentile":0.26163,"ingestedAt":"2026-07-08T18:25:47.204Z","slug":"CVE-2024-28233","body":"## Overview\n\n### Impact\n\nAffected configurations:\n\n- Single-origin JupyterHub deployments\n- JupyterHub deployments with user-controlled applications running on subdomains or peer subdomains of either the Hub or a single-user server.\n\nBy 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:\n\n- Full access to JupyterHub API and user's single-user server, e.g.\n  - Create and exfiltrate an API Token\n  - Exfiltrate all files hosted on the user's single-user server: notebooks, images, etc.\n  - Install malicious extensions. They can be used as a backdoor to silently regain access to victim's session anytime.\n\n### Patches\n\nTo prevent cookie-tossing:\n\n- Upgrade to JupyterHub 4.1 (both hub and user environment)\n- enable per-user domains via `c.JupyterHub.subdomain_host = \"https://mydomain.example.org\"`\n- set `c.JupyterHub.cookie_host_prefix_enabled = True` to enable domain-locked cookies\n\nor, if available (applies to earlier JupyterHub versions):\n\n- deploy jupyterhub on its own domain, not shared with any other services\n- enable per-user domains via `c.JupyterHub.subdomain_host = \"https://mydomain.example.org\"`\n\n## Affected packages\n\n- `jupyterhub < 4.1.0`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `jupyterhub 4.1.0`","depth":"twilight","depthScore":45,"depthScoreParts":{"impact":44.6,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}