{"answers":{"affected":"7 open source packages ship an affected version, including jupyter-base-notebook, jupyter-notebook and notebook. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32798 in the wild and no public exploit code.","fix":"Upgrade jupyter-base-notebook to a fixed version for your release line: 5.7.11 or 6.4.1.","what":"CVE-2021-32798 is a critical cross-site scripting vulnerability in jupyter notebook, published on 9 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32798 and fix it if it is affected.\n\nWhat it is: CVE-2021-32798 is a critical cross-site scripting vulnerability in jupyter notebook, published on 9 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32798 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jupyter-base-notebook (Bitnami): affected from 5.7.0; fixed in 5.7.11, 6.4.1\n- jupyter-notebook (Bitnami): affected from 5.7.0; fixed in 5.7.11, 6.4.1\n- notebook (PyPI): affected all versions; fixed in 5.7.11\n- notebook (PyPI): affected all versions; fixed in 5.7.11\n- notebook (PyPI): affected from 5.7.0; fixed in 5.7.11\n- notebook (PyPI): affected from 6.0.0; fixed in 6.4.1\n- notebook (PyPI): affected from 6.0.0; fixed in 6.4.1\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-32798/ (Markdown: https://insights.sbomify.com/CVE-2021-32798/index.md)","id":"CVE-2021-32798","markdown":"https://insights.sbomify.com/CVE-2021-32798/index.md","name":"CVE-2021-32798","record":{"aliases":["BIT-jupyter-base-notebook-2021-32798","BIT-jupyter-notebook-2021-32798","DEBIAN-CVE-2021-32798","GHSA-hwvq-6gjx-j797","PYSEC-2021-118","UBUNTU-CVE-2021-32798"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter Notebook","requires_auth":"none","summary":"An attacker can execute arbitrary code on a victim's computer by tricking them into opening a malicious notebook file due to insufficient input sanitization.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"notebook","vendor":"jupyter"}],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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":"The Jupyter notebook is a web-based notebook environment for interactive computing. In affected versions untrusted notebook can execute code on load. Jupyter Notebook uses a deprecated version of Google Caja to sanitize user inputs. A public Caja bypass can be used to trigger an XSS when a victim opens a malicious ipynb document in Jupyter Notebook. The XSS allows an attacker to execute arbitrary code on the victim computer using Jupyter APIs.","ecosystems":["Bitnami","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":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","id":"CVE-2021-32798","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":7,"n_references":2,"next":{"headline":"Bypass of Two Factor Authentication in Nextcloud server","id":"CVE-2021-32800"},"packages":[{"ecosystem":"Bitnami","fixed":["5.7.11","6.4.1"],"introduced":["5.7.0","6.4.0"],"last_affected":[],"package":"jupyter-base-notebook","purl":"pkg:bitnami/jupyter-base-notebook","source":"BIT-jupyter-base-notebook-2021-32798"},{"ecosystem":"Bitnami","fixed":["5.7.11","6.4.1"],"introduced":["5.7.0","6.4.0"],"last_affected":[],"package":"jupyter-notebook","purl":"pkg:bitnami/jupyter-notebook","source":"BIT-jupyter-notebook-2021-32798"},{"ecosystem":"PyPI","fixed":["5.7.11"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-hwvq-6gjx-j797"},{"ecosystem":"PyPI","fixed":["5.7.11"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-hwvq-6gjx-j797"},{"ecosystem":"PyPI","fixed":["5.7.11"],"introduced":["5.7.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"PYSEC-2021-118"},{"ecosystem":"PyPI","fixed":["6.4.1"],"introduced":["6.0.0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-hwvq-6gjx-j797"},{"ecosystem":"PyPI","fixed":["6.4.1"],"introduced":["6.0.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-hwvq-6gjx-j797"}],"prev":{"headline":"JupyterLab: XSS due to lack of sanitization of the action attribute of an html \u003cform\u003e","id":"CVE-2021-32797"},"products":["notebook"],"published":"2021-08-09","related":[{"cvss_score":7.8,"headline":"Jupyter Notebook file bypasses sanitization, executes JavaScript","id":"CVE-2018-8768","kev_date_added":null,"published":"2018-03-18"},{"cvss_score":7.5,"headline":"Insertion of Sensitive Information into Log File affects Jupyter Notebook","id":"CVE-2022-24758","kev_date_added":null,"published":"2022-03-31"},{"cvss_score":6.1,"headline":"Jupyter Notebook open redirect vulnerability","id":"CVE-2019-10856","kev_date_added":null,"published":"2019-04-04"},{"cvss_score":6.1,"headline":"Jupyter Notebook XSS via untrusted notebooks","id":"CVE-2018-19351","kev_date_added":null,"published":"2018-11-18"},{"cvss_score":6.1,"headline":"Jupyter Notebook XSS via directory name","id":"CVE-2018-19352","kev_date_added":null,"published":"2018-11-18"},{"cvss_score":5.4,"headline":"Improper Neutralization of Input During Web Page Generation in Jupyter Notebook","id":"CVE-2019-9644","kev_date_added":null,"published":"2019-03-12"}],"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":"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-03","vendors":["jupyter"]},"summary":"An attacker can execute arbitrary code on a victim's computer by tricking them into opening a malicious notebook file due to insufficient input sanitization.","url":"https://insights.sbomify.com/CVE-2021-32798/"}