{"answers":{"affected":"15 open source packages ship an affected version, including nbdime-jupyterlab and nbdime. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-41134 in the wild and no public exploit code.","fix":"Upgrade nbdime-jupyterlab to a fixed version for your release line: 1.0.1 or 2.1.1.","what":"CVE-2021-41134 is a high-severity cross-site scripting vulnerability in jupyter nbdime, published on 3 Nov 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-41134 and fix it if it is affected.\n\nWhat it is: CVE-2021-41134 is a high-severity cross-site scripting vulnerability in jupyter nbdime, published on 3 Nov 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-41134 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- nbdime-jupyterlab (npm): affected all versions; fixed in 1.0.1\n- nbdime-jupyterlab (npm): affected all versions; fixed in 1.0.1\n- nbdime-jupyterlab (npm): affected from 2.0.0; fixed in 2.1.1\n- nbdime-jupyterlab (npm): affected from 2.0.0; fixed in 2.1.1\n- nbdime (PyPI): affected all versions; fixed in 1.1.1, 2.1.1, 3.1.1\n- nbdime (PyPI): affected all versions; fixed in 1.1.1\n- nbdime (PyPI): affected all versions; fixed in 1.1.1\n- nbdime (PyPI): affected from 2.0.0; fixed in 2.1.1\n- nbdime (PyPI): affected from 2.0.0; fixed in 2.1.1\n- nbdime (PyPI): affected from 3.0.0; fixed in 3.1.1\n- nbdime (PyPI): affected from 3.0.0; fixed in 3.1.1\n- nbdime (npm): affected all versions; fixed in 5.0.2\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-2021-41134/ (Markdown: https://insights.sbomify.com/CVE-2021-41134/index.md)","id":"CVE-2021-41134","markdown":"https://insights.sbomify.com/CVE-2021-41134/index.md","name":"CVE-2021-41134","record":{"aliases":["GHSA-p6rw-44q7-3fw4","PYSEC-2021-428","openSUSE-SU-2024:11630-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter notebook diffing tool","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary scripts in Jupyter notebooks via unsanitized file names in nbdime, requiring users to update the library.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nbdime","vendor":"jupyter"},{"product":"nbdime-jupyterlab","vendor":"jupyter"}],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"nbdime provides tools for diffing and merging of Jupyter Notebooks. In affected versions a stored cross-site scripting (XSS) issue exists within the Jupyter-owned nbdime project. It appears that when reading the file name and path from disk, the extension does not sanitize the string it constructs before returning it to be displayed. The diffNotebookCheckpoint function within nbdime causes this issue. When attempting to display the name of the local notebook (diffNotebookCheckpoint), nbdime appears to simply append .ipynb to the name of the input file. The NbdimeWidget is then created, and the base string is passed through to the request API function. From there, the frontend simply renders the HTML tag and anything along with it. Users are advised to patch to the most recent version of the affected product.","ecosystems":["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":"Stored XSS in Jupyter nbdime","id":"CVE-2021-41134","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":15,"n_references":2,"next":{"headline":"Authz Module Non-Determinism","id":"CVE-2021-41135"},"packages":[{"ecosystem":"PyPI","fixed":["1.1.1","2.1.1","3.1.1"],"introduced":["0","2.0.0","3.0.0"],"last_affected":[],"package":"nbdime","purl":"pkg:pypi/nbdime","source":"PYSEC-2021-428"},{"ecosystem":"PyPI","fixed":["1.1.1"],"introduced":["0"],"last_affected":[],"package":"nbdime","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"PyPI","fixed":["1.1.1"],"introduced":["0"],"last_affected":[],"package":"nbdime","purl":"pkg:pypi/nbdime","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"PyPI","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"nbdime","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"PyPI","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"nbdime","purl":"pkg:pypi/nbdime","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"PyPI","fixed":["3.1.1"],"introduced":["3.0.0"],"last_affected":[],"package":"nbdime","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"PyPI","fixed":["3.1.1"],"introduced":["3.0.0"],"last_affected":[],"package":"nbdime","purl":"pkg:pypi/nbdime","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["5.0.2"],"introduced":["0"],"last_affected":[],"package":"nbdime","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["5.0.2"],"introduced":["0"],"last_affected":[],"package":"nbdime","purl":"pkg:npm/nbdime","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["6.1.2"],"introduced":["6.0.0"],"last_affected":[],"package":"nbdime","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["6.1.2"],"introduced":["6.0.0"],"last_affected":[],"package":"nbdime","purl":"pkg:npm/nbdime","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"nbdime-jupyterlab","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["1.0.1"],"introduced":["0"],"last_affected":[],"package":"nbdime-jupyterlab","purl":"pkg:npm/nbdime-jupyterlab","source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"nbdime-jupyterlab","purl":null,"source":"GHSA-p6rw-44q7-3fw4"},{"ecosystem":"npm","fixed":["2.1.1"],"introduced":["2.0.0"],"last_affected":[],"package":"nbdime-jupyterlab","purl":"pkg:npm/nbdime-jupyterlab","source":"GHSA-p6rw-44q7-3fw4"}],"prev":{"headline":"Sandbox bypass via recent VFS-manipulating syscalls","id":"CVE-2021-41133"},"products":["nbdime"],"published":"2021-11-03","related":[],"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["jupyter"]},"summary":"Attackers can execute arbitrary scripts in Jupyter notebooks via unsanitized file names in nbdime, requiring users to update the library.","url":"https://insights.sbomify.com/CVE-2021-41134/"}