# CVE-2021-32798: Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.11%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-08-09T20:50:10.000Z
- Modified: 2026-09-10T03:49:27.336Z
- Also known as: GHSA-hwvq-6gjx-j797, BIT-JUPYTER-BASE-NOTEBOOK-2021-32798, BIT-JUPYTER-NOTEBOOK-2021-32798, PYSEC-2021-118
- Weaknesses: CWE-75, CWE-79, CWE-80
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- jupyter notebook: >= 6.0.0, < 6.4.1; < 5.7.11; from 5.7.0 before 5.7.11; 6.4.0
- notebook (PyPI): before 5.7.11; from 6.0.0 before 6.4.1; before 79fc76e890a8ec42f73a3d009e44ef84c14ef0d5; from 5.7.0 before 5.7.11
- jupyter-base-notebook (Bitnami): from 5.7.0 before 5.7.11; from 6.4.0 before 6.4.1
- jupyter-notebook (Bitnami): from 5.7.0 before 5.7.11; from 6.4.0 before 6.4.1

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 10.0 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N`
- NVD: CVSS:3.1 9.6 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5> (exploit, advisory, fix, third-party-advisory, web)
- <https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797> (advisory, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32798> (advisory, web)
- <https://github.com/jupyter/notebook> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2021-118.yaml> (web)

## Sources

- CVE List: [CVE-2021-32798](https://www.cve.org/CVERecord?id=CVE-2021-32798), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-hwvq-6gjx-j797](https://github.com/advisories/GHSA-hwvq-6gjx-j797), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-32798](https://nvd.nist.gov/vuln/detail/CVE-2021-32798), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-118](https://osv.dev/vulnerability/PYSEC-2021-118), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-JUPYTER-BASE-NOTEBOOK-2021-32798](https://osv.dev/vulnerability/BIT-JUPYTER-BASE-NOTEBOOK-2021-32798), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-JUPYTER-NOTEBOOK-2021-32798](https://osv.dev/vulnerability/BIT-JUPYTER-NOTEBOOK-2021-32798), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-32798 · Whole record: https://cve.day/CVE-2021-32798.json · Rebuilt by cve.day 2026-11-25T22:58:03.078Z
