What’s Vulnerable › Vulnerabilities
CVE-2021-32798: Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook
- Severity: critical (CVSS 9.6 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.1% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-08-09 · updated 2026-06-17
- Weakness: CWE-79
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 products
- jupyter notebook: from 5.7.0 before 5.7.11; 6.4.0 — fixed in 5.7.11
How to fix
Upgrade to a fixed version: jupyter notebook 5.7.11. Check the vendor advisory for mitigations.
References
- https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5
- https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797
- https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5
- https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797
Get alerted when CVE-2021-32798 or the next vulnerability affects your stack