CVE-2024-35225 Jupyter Server Proxy has a reflected XSS issue in host parameter
Attackers can execute arbitrary JavaScript in users' browsers via a reflected XSS vulnerability in the Jupyter Server Proxy host parameter.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-35225?
CVE-2024-35225 is a critical cross-site scripting vulnerability in jupyterhub jupyter-server-proxy, published on 11 Jun 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Jupyter Server Proxy allows users to run arbitrary external processes alongside their notebook server and provide authenticated web access to them. Versions of 3.x prior to 3.2.4 and 4.x prior to 4.2.0 have a reflected cross-site scripting (XSS) issue. The `/proxy` endpoint accepts a `host` path segment in the format `/proxy/<host>`. When this endpoint is called with an invalid `host` value, `jupyter-server-proxy` replies with a response that includes the value of `host`, without sanitization [2]. A third-party actor can leverage this by sending a phishing link with an invalid `host` value containing custom JavaScript to a user. When the user clicks this phishing link, the browser renders the response of `GET /proxy/<host>`, which runs the custom JavaScript contained in `host` set by the actor. As any arbitrary JavaScript can be run after the user clicks on a phishing link, this issue permits extensive access to the user's JupyterLab instance for an actor. Patches are included in versions 4.2.0 and 3.2.4. As a workaround, server operators who are unable to upgrade can disable the `jupyter-server-proxy` extension.
Which versions are affected by CVE-2024-35225?
5 open source packages ship an affected version, including jupyter-server-proxy. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jupyter-server-proxy PyPI | From 3.0.0 | 3.2.4, 4.2.0 |
jupyter-server-proxy PyPI | From 3.0.0 | 3.2.4 |
jupyter-server-proxy PyPI | From 3.0.0 | 3.2.4 |
jupyter-server-proxy PyPI | From 4.0.0 | 4.2.0 |
jupyter-server-proxy PyPI | From 4.0.0 | 4.2.0 |
Products include Jupyter Jupyter Server Proxy.
How do I fix CVE-2024-35225?
Upgrade jupyter-server-proxy to a fixed version for your release line: 3.2.4 or 4.2.0.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-35225 being exploited?
There is no known exploitation of CVE-2024-35225 in the wild and no public exploit code.
Other vulnerabilities in jupyterhub jupyter-server-proxy
Sources
Also known as GHSA-fvcq-4x64-hqxr, PYSEC-2024-236.