CVE-2021-32798
Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook
Also known as BIT-jupyter-base-notebook-2021-32798, BIT-jupyter-notebook-2021-32798, GHSA-hwvq-6gjx-j797, PYSEC-2021-118
Mitigation
- Upgrade notebook to one of 5.7.11, 6.4.1 (or later in the same release line).
Who should check
- Projects that depend on PyPI package notebook (< 5.7.11)
- Anyone running jupyter notebook >= 6.0.0, < 6.4.1; < 5.7.11
Vulnerability facts
- Affected
- notebook < 5.7.11
- Fixed in
- 5.7.11, 6.4.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 10.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- EPSS
- 2.11% chance of exploitation in 30 days (percentile 82, 2026-11-26)
- CWE
- CWE-79
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-32798. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-32798.md Affected: notebook < 5.7.11 Fixed in: 5.7.11, 6.4.1 Steps: 1. Search this machine and project for notebook (PyPI), jupyter notebook: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2021-32798 being exploited?
There is no confirmed exploitation: CVE-2021-32798 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 2.11% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2021-32798?
Critical: CVSS 10.0 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2021-32798?
notebook < 5.7.11.
Is there a fix for CVE-2021-32798?
Yes. Fixed in 5.7.11, 6.4.1. Upgrade notebook to one of 5.7.11, 6.4.1 (or later in the same release line).
How do I check if I'm affected by CVE-2021-32798?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.