Skip to content
JupyterGHSA-hwvq-6gjx-j797

Special Element Injection in notebook

High10.0CVE-2021-32798 · Published Aug 23, 2021 · updated Sep 10, 2026

### Impact Untrusted notebook can execute code on load. This is a remote code execution, but requires user action to open a notebook. ### Patches 5.7.11, 6.4.1 ### References [OWASP Page on Injection Prevention](https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html#injection-prevention-rules) ### For more information If you have any questions or comments about this advisory, or vulnerabilities to report, please email our security list security@ipython.org. Credit: Guillaume Jeanne from Google ### Example: A notebook with the following content in a cell and it would display an alert when opened for the first time in Notebook (in an untrusted state): ``` { "cell_type": "code", "execution_count": 0, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<select><iframe></select><img src=x: onerror=alert('xss')>\n"], "text/plain": [] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "" ] } ````

GitHub advisory

Affected versions

PackageAffectedFixed in
notebook
PyPI
< 5.7.115.7.11
>= 6.0.0, < 6.4.16.4.1
Details and references
CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-75, CWE-79, CWE-80
Also known as
BIT-jupyter-base-notebook-2021-32798, BIT-jupyter-notebook-2021-32798, CVE-2021-32798, PYSEC-2021-118

More Jupyter advisories

All Jupyter
Advisory
Improper Neutralization of Input During Web Page Generation in Jupyter Notebook
Medium5.4May 14, 2022
Sensitive Auth & Cookie data stored in Jupyter server logs
High7.5Apr 5, 2022
Insertion of Sensitive Information into Log File in Jupyter notebook
High7.5Mar 25, 2022
incomplete JupyterHub logout with simultaneous JupyterLab sessions
Medium3.5Nov 8, 2021
JupyterLab: XSS due to lack of sanitization of the action attribute of an html <form>
Medium7.4Aug 23, 2021
Jupyter Server open redirect vulnerability
Medium6.1Dec 21, 2020

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.