{"answers":{"affected":"13 open source packages ship an affected version, including @jupyter-notebook/help-extension, jupyter-base-notebook and jupyter-notebook.","exploited":"There is no known exploitation of CVE-2026-40171 in the wild and no public exploit code.","fix":"Upgrade @jupyter-notebook/help-extension to 7.5.6 or later.","what":"CVE-2026-40171 is a high-severity cross-site scripting vulnerability in jupyter help-extension, published on 6 May 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40171 and fix it if it is affected.\n\nWhat it is: CVE-2026-40171 is a high-severity cross-site scripting vulnerability in jupyter help-extension, published on 6 May 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-40171 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @jupyter-notebook/help-extension (npm): affected from 7.0.0; fixed in 7.5.6\n- @jupyter-notebook/help-extension (npm): affected from 7.0.0; fixed in 7.5.6\n- jupyter-base-notebook (Bitnami): affected from 7.0.0; fixed in 7.5.6\n- jupyter-notebook (Bitnami): affected from 7.0.0; fixed in 7.5.6\n- jupyterlab (Bitnami): affected all versions; fixed in 4.5.7\n- jupyterlab (PyPI): affected all versions; fixed in 4.5.7\n- jupyterlab (PyPI): affected all versions; fixed in 4.5.7\n- jupyterlab (PyPI): affected all versions; fixed in 4.5.7\n- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6\n- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6\n- notebook (PyPI): affected from 7.0.0; fixed in 7.5.6\n- @jupyterlab/help-extension (npm): affected all versions; fixed in 4.5.7\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-2026-40171/ (Markdown: https://insights.sbomify.com/CVE-2026-40171/index.md)","id":"CVE-2026-40171","markdown":"https://insights.sbomify.com/CVE-2026-40171/index.md","name":"CVE-2026-40171","record":{"aliases":["BIT-jupyter-base-notebook-2026-40171","BIT-jupyter-notebook-2026-40171","BIT-jupyterlab-2026-40171","CLEANSTART-2026-OX78672","CLEANSTART-2026-SO25555","DEBIAN-CVE-2026-40171","GHSA-rch3-82jr-f9w9","PYSEC-2026-2538","PYSEC-2026-2682","UBUNTU-CVE-2026-40171"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter Notebook","requires_auth":"high_privilege","summary":"Stored XSS in Jupyter help linker allows attackers to steal authentication tokens and execute arbitrary code via malicious notebooks.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.4,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"In Jupyter Notebook versions 7.0.0 through 7.5.5, JupyterLab versions 4.5.6 and earlier, and the corresponding @jupyter-notebook/help-extension and @jupyterlab/help-extension packages before 7.5.6 and 4.5.7, a stored cross-site scripting issue in the help command linker can be chained with attacker-controlled notebook content to steal authentication tokens with a single click.\n\nAn attacker can craft a malicious notebook file containing elements that appear indistinguishable from legitimate controls and trigger execution when a user interacts with them. Successful exploitation allows theft of the user's authentication token and complete takeover of the Jupyter session through the REST API, including reading files, creating or modifying files, accessing kernels to execute arbitrary code, and creating terminals for shell access. This issue has been fixed in Notebook 7.5.6, JupyterLab 4.5.7, @jupyter-notebook/help-extension 7.5.6, and @jupyterlab/help-extension 4.5.7. As a workaround, disable the affected help extensions or set allowCommandLinker to false in the sanitizer configuration.","ecosystems":["Bitnami","PyPI","npm"],"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 Notebook and JupyterLab token theft via stored XSS in help command linker","id":"CVE-2026-40171","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":13,"n_references":1,"next":{"headline":"authentik: Privilege Escalation via User PATCH: Superuser Group Assignment Bypasses enable_group_superuser","id":"CVE-2026-40172"},"packages":[{"ecosystem":"Bitnami","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"jupyter-base-notebook","purl":"pkg:bitnami/jupyter-base-notebook","source":"BIT-jupyter-base-notebook-2026-40171"},{"ecosystem":"Bitnami","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"jupyter-notebook","purl":"pkg:bitnami/jupyter-notebook","source":"BIT-jupyter-notebook-2026-40171"},{"ecosystem":"Bitnami","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:bitnami/jupyterlab","source":"BIT-jupyterlab-2026-40171"},{"ecosystem":"PyPI","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"PyPI","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"PyPI","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"PYSEC-2026-2538"},{"ecosystem":"PyPI","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"PyPI","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"PyPI","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"PYSEC-2026-2682"},{"ecosystem":"npm","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"@jupyter-notebook/help-extension","purl":null,"source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"npm","fixed":["7.5.6"],"introduced":["7.0.0"],"last_affected":[],"package":"@jupyter-notebook/help-extension","purl":"pkg:npm/%40jupyter-notebook/help-extension","source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"npm","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"@jupyterlab/help-extension","purl":null,"source":"GHSA-rch3-82jr-f9w9"},{"ecosystem":"npm","fixed":["4.5.7"],"introduced":["0"],"last_affected":[],"package":"@jupyterlab/help-extension","purl":"pkg:npm/%40jupyterlab/help-extension","source":"GHSA-rch3-82jr-f9w9"}],"prev":{"headline":"ngtcp2 has a qlog transport parameter serialization stack buffer overflow","id":"CVE-2026-40170"},"products":["help-extension","jupyterlab","notebook"],"published":"2026-05-06","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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":"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":"2026-05-08","vendors":["jupyter","jupyter-notebook","jupyterlab"]},"summary":"Stored XSS in Jupyter help linker allows attackers to steal authentication tokens and execute arbitrary code via malicious notebooks.","url":"https://insights.sbomify.com/CVE-2026-40171/"}