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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 5.7.11, 6.4.1 (CNA); fix release not confirmed
- Status: published
- Published: 2021-08-09 · Modified: 2024-08-03
- Aliases: GHSA-hwvq-6gjx-j797, BIT-jupyter-base-notebook-2021-32798, BIT-jupyter-notebook-2021-32798, PYSEC-2021-118, UBUNTU-CVE-2021-32798, DEBIAN-CVE-2021-32798
- Record: https://cvemate.com/vulnerability/CVE-2021-32798 · JSON: https://cvemate.com/vulnerability/CVE-2021-32798/json

## Description

```text
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.
```

## Signals

- CVSS: 10 critical (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
- EPSS: 2.106%, percentile 82.38%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- debian jupyter-notebook (Debian): \< 6.4.3-1
- ubuntu jupyter-notebook (Ubuntu): All versions (No fix recorded)
- jupyter notebook: ≥ 6.0.0, \< 6.4.1 \| \< 5.7.11 \| ≥ 5.7.0, \< 5.7.11 \| 6.4.0
- PyPI notebook (PyPI): \< 5.7.11 \| ≥ 6.0.0, \< 6.4.1 \| \< 79fc76e890a8ec42f73a3d009e44ef84c14ef0d5 \| ≥ 5.7.0, \< 5.7.11

## References

- <https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797>
- <https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-32798>
- <https://github.com/jupyter/notebook>
- <https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2021-118.yaml>
- <https://ubuntu.com/security/CVE-2021-32798>
- <https://www.cve.org/CVERecord?id=CVE-2021-32798>
- <https://security-tracker.debian.org/tracker/CVE-2021-32798>

---

Data as of 2026-12-05T09:39:48.840Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
