{"answers":{"affected":"17 open source packages ship an affected version, including jupyterlab and notebook. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32797 in the wild and no public exploit code.","fix":"Upgrade jupyterlab to a fixed version for your release line: 1.2.21, 2.2.10, 2.3.2 or 3.0.17.","what":"CVE-2021-32797 is a high-severity cross-site scripting vulnerability in jupyterlab, published on 9 Aug 2021. 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-2021-32797 and fix it if it is affected.\n\nWhat it is: CVE-2021-32797 is a high-severity cross-site scripting vulnerability in jupyterlab, published on 9 Aug 2021. 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-2021-32797 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jupyterlab (Bitnami): affected all versions; fixed in 1.2.21, 2.2.10, 2.3.2, 3.0.17, 3.1.4\n- jupyterlab (PyPI): affected all versions; fixed in 1.2.21, 2.2.10, 2.3.2, 3.0.17, 3.1.4\n- jupyterlab (PyPI): affected all versions; fixed in 1.2.21\n- jupyterlab (PyPI): affected all versions; fixed in 1.2.21\n- jupyterlab (PyPI): affected from 2.0.0a0; fixed in 2.2.10\n- jupyterlab (PyPI): affected from 2.0.0a0; fixed in 2.2.10\n- jupyterlab (PyPI): affected from 2.3.0a0; fixed in 2.3.2\n- jupyterlab (PyPI): affected from 2.3.0a0; fixed in 2.3.2\n- jupyterlab (PyPI): affected from 3.0.0a0; fixed in 3.0.17\n- jupyterlab (PyPI): affected from 3.0.0a0; fixed in 3.0.17\n- jupyterlab (PyPI): affected from 3.1.0a0; fixed in 3.1.4\n- jupyterlab (PyPI): affected from 3.1.0a0; fixed in 3.1.4\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-32797/ (Markdown: https://insights.sbomify.com/CVE-2021-32797/index.md)","id":"CVE-2021-32797","markdown":"https://insights.sbomify.com/CVE-2021-32797/index.md","name":"CVE-2021-32797","record":{"aliases":["BIT-jupyterlab-2021-32797","GHSA-4952-p58q-6crx","MGASA-2023-0060","PYSEC-2021-130","PYSEC-2026-688","openSUSE-SU-2022:10075-1"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JupyterLab interface","requires_auth":"none","summary":"Attackers can execute arbitrary code by crafting malicious notebooks that exploit unsanitized form action attributes, requiring user interaction to open the file.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jupyterlab","vendor":"jupyter"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"JupyterLab is a user interface for Project Jupyter which will eventually replace the classic Jupyter Notebook. In affected versions untrusted notebook can execute code on load. In particular JupyterLab doesn’t sanitize the action attribute of html `\u003cform\u003e`. Using this it is possible to trigger the form validation outside of the form itself. This is a remote code execution, but requires user action to open a notebook.","ecosystems":["Bitnami","PyPI","SUSE:Package Hub 15 SP4","openSUSE:Leap 15.4"],"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":"JupyterLab: XSS due to lack of sanitization of the action attribute of an html \u003cform\u003e","id":"CVE-2021-32797","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":19,"n_references":2,"next":{"headline":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","id":"CVE-2021-32798"},"packages":[{"ecosystem":"Bitnami","fixed":["1.2.21","2.2.10","2.3.2","3.0.17","3.1.4"],"introduced":["0","2.0.0","2.3.0","3.0.0","3.1.0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:bitnami/jupyterlab","source":"BIT-jupyterlab-2021-32797"},{"ecosystem":"PyPI","fixed":["1.2.21","2.2.10","2.3.2","3.0.17","3.1.4"],"introduced":["0","2","2.3","3","3.1"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"PYSEC-2021-130"},{"ecosystem":"PyPI","fixed":["1.2.21"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["1.2.21"],"introduced":["0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["2.2.10"],"introduced":["2.0.0a0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["2.2.10"],"introduced":["2.0.0a0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["2.3.2"],"introduced":["2.3.0a0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["2.3.2"],"introduced":["2.3.0a0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["3.0.17"],"introduced":["3.0.0a0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["3.0.17"],"introduced":["3.0.0a0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["3.1.4"],"introduced":["3.1.0a0"],"last_affected":[],"package":"jupyterlab","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["3.1.4"],"introduced":["3.1.0a0"],"last_affected":[],"package":"jupyterlab","purl":"pkg:pypi/jupyterlab","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["5.7.11","6.4.1"],"introduced":["0","6.0.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"PYSEC-2026-688"},{"ecosystem":"PyPI","fixed":["5.7.11"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["5.7.11"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["6.4.1"],"introduced":["6.0.0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-4952-p58q-6crx"},{"ecosystem":"PyPI","fixed":["6.4.1"],"introduced":["6.0.0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-4952-p58q-6crx"},{"ecosystem":"SUSE:Package Hub 15 SP4","fixed":["2.2.10-bp154.2.3.1"],"introduced":["0"],"last_affected":[],"package":"python-jupyterlab","purl":"pkg:rpm/suse/python-jupyterlab\u0026distro=SUSE%20Package%20Hub%2015%20SP4","source":"openSUSE-SU-2022:10075-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["2.2.10-bp154.2.3.1"],"introduced":["0"],"last_affected":[],"package":"python-jupyterlab","purl":"pkg:rpm/opensuse/python-jupyterlab\u0026distro=openSUSE%20Leap%2015.4","source":"openSUSE-SU-2022:10075-1"}],"prev":{"headline":"Misinterpretation of malicious XML input in xmldom","id":"CVE-2021-32796"},"products":["jupyterlab"],"published":"2021-08-09","related":[{"cvss_score":10,"headline":"Remote Code Execution (RCE) vulnerability in jupyterlab extension template `update-integration-tests` GitHub Action","id":"CVE-2024-39700","kev_date_added":null,"published":"2024-07-16"},{"cvss_score":8.8,"headline":"JupyterLab has an Extension Manager API/GUI Policy Discrepancy, allowing 3rd party (malicious) extensions install via POST request","id":"CVE-2026-42266","kev_date_added":null,"published":"2026-05-13"},{"cvss_score":8.6,"headline":"jupyterlab: Command linker attributes in HTML enable one-click command execution from untrusted content","id":"CVE-2026-42557","kev_date_added":null,"published":"2026-05-13"},{"cvss_score":7.6,"headline":"HTML injection in Jupyter Notebook and JupyterLab leading to DOM Clobbering","id":"CVE-2024-43805","kev_date_added":null,"published":"2024-08-28"},{"cvss_score":2.1,"headline":"JupyterLab LaTeX typesetter links did not enforce `noopener` attribute","id":"CVE-2025-59842","kev_date_added":null,"published":"2025-09-26"}],"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":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":["jupyterlab"]},"summary":"Attackers can execute arbitrary code by crafting malicious notebooks that exploit unsanitized form action attributes, requiring user interaction to open the file.","url":"https://insights.sbomify.com/CVE-2021-32797/"}