{"answers":{"affected":"5 open source packages ship an affected version, including jupyter-server-proxy. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-35225 in the wild and no public exploit code.","fix":"Upgrade jupyter-server-proxy to a fixed version for your release line: 3.2.4 or 4.2.0.","what":"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."},"fix_prompt":"Check this codebase for CVE-2024-35225 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: There is no known exploitation of CVE-2024-35225 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jupyter-server-proxy (PyPI): affected from 3.0.0; fixed in 3.2.4, 4.2.0\n- jupyter-server-proxy (PyPI): affected from 3.0.0; fixed in 3.2.4\n- jupyter-server-proxy (PyPI): affected from 3.0.0; fixed in 3.2.4\n- jupyter-server-proxy (PyPI): affected from 4.0.0; fixed in 4.2.0\n- jupyter-server-proxy (PyPI): affected from 4.0.0; fixed in 4.2.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-35225/ (Markdown: https://insights.sbomify.com/CVE-2024-35225/index.md)","id":"CVE-2024-35225","markdown":"https://insights.sbomify.com/CVE-2024-35225/index.md","name":"CVE-2024-35225","record":{"aliases":["GHSA-fvcq-4x64-hqxr","PYSEC-2024-236"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter server proxy","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in users' browsers via a reflected XSS vulnerability in the Jupyter Server Proxy host parameter.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jupyter_server_proxy","vendor":"jupyter"}],"cvss":{"score":9.7,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"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/\u003chost\u003e`. 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/\u003chost\u003e`, 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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Jupyter Server Proxy has a reflected XSS issue in host parameter","id":"CVE-2024-35225","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":5,"n_references":4,"next":{"headline":"PHP Code Injection by malicious attribute in extends-tag in Smarty","id":"CVE-2024-35226"},"packages":[{"ecosystem":"PyPI","fixed":["3.2.4","4.2.0"],"introduced":["3.0.0","4.1.2"],"last_affected":[],"package":"jupyter-server-proxy","purl":"pkg:pypi/jupyter-server-proxy","source":"PYSEC-2024-236"},{"ecosystem":"PyPI","fixed":["3.2.4"],"introduced":["3.0.0"],"last_affected":[],"package":"jupyter-server-proxy","purl":null,"source":"GHSA-fvcq-4x64-hqxr"},{"ecosystem":"PyPI","fixed":["3.2.4"],"introduced":["3.0.0"],"last_affected":[],"package":"jupyter-server-proxy","purl":"pkg:pypi/jupyter-server-proxy","source":"GHSA-fvcq-4x64-hqxr"},{"ecosystem":"PyPI","fixed":["4.2.0"],"introduced":["4.0.0"],"last_affected":[],"package":"jupyter-server-proxy","purl":null,"source":"GHSA-fvcq-4x64-hqxr"},{"ecosystem":"PyPI","fixed":["4.2.0"],"introduced":["4.0.0"],"last_affected":[],"package":"jupyter-server-proxy","purl":"pkg:pypi/jupyter-server-proxy","source":"GHSA-fvcq-4x64-hqxr"}],"prev":{"headline":"Stored Cross-Site Scripting (XSS) in OpenProject","id":"CVE-2024-35224"},"products":["jupyter-server-proxy"],"published":"2024-06-11","related":[{"cvss_score":9.1,"headline":"Jupyter Server Proxy's Websocket Proxying does not require authentication","id":"CVE-2024-28179","kev_date_added":null,"published":"2024-03-20"},{"cvss_score":6.3,"headline":"SSRF vulnerability (requires authentication)","id":"CVE-2022-21697","kev_date_added":null,"published":"2022-01-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["jupyterhub"]},"summary":"Attackers can execute arbitrary JavaScript in users' browsers via a reflected XSS vulnerability in the Jupyter Server Proxy host parameter.","url":"https://insights.sbomify.com/CVE-2024-35225/"}