Every CVE Search/ Get API key

CVE-2021-32798

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

10.0 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

2.11%Up 0.9 points since Aug 10, 2021
90%50%10%1%

What each source reports

CVE List Score used 10.0

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

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.

Record
CVE-2021-32798
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2021-0149 10.0

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.

Record
EUVD-2021-0149
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-hwvq-6gjx-j797 7.8

Special Element Injection in notebook

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

For more information

If you have any questions or comments about this advisory, or vulnerabilities to report, please email our security list [email protected].

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": [ "" ] }
Record
GHSA-hwvq-6gjx-j797
CVSS 4.0
7.8 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-75, CWE-79, CWE-80
Updated
2026-11-02
NVD 10.0

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.

Record
CVE-2021-32798
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS 3.1
9.6 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-79
Updated
2026-11-02
OSV 9.6

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.

Record
CVE-2021-32798
CVSS 3.1
9.6 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-06
OSVDEBIAN-CVE-2021-32798 9.6

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.

Record
DEBIAN-CVE-2021-32798
CVSS 3.1
9.6 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-02
Show 6 moreShow less
OSVGHSA-hwvq-6gjx-j797 7.8

Special Element Injection in notebook

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

For more information

If you have any questions or comments about this advisory, or vulnerabilities to report, please email our security list [email protected].

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": [ "" ] }
Record
GHSA-hwvq-6gjx-j797
CVSS 4.0
7.8 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
Weakness
CWE-75, CWE-79, CWE-80
Updated
2026-11-02
OSVUBUNTU-CVE-2021-32798 10.0

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.

Record
UBUNTU-CVE-2021-32798
CVSS 3.1
10.0 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS 3.1
9.6 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-jupyter-base-notebook-2021-32798 No score

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

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.

Record
BIT-jupyter-base-notebook-2021-32798
Updated
2026-11-02
OSVBIT-jupyter-notebook-2021-32798 No score

Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook

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.

Record
BIT-jupyter-notebook-2021-32798
Updated
2026-11-02
OSVopenSUSE-SU-2024:0231-1 No score

Security update for python-notebook

This update for python-notebook fixes the following issues:

  • Update to 5.7.11
    • sanitizer fix CVE-2021-32798 (boo#1227583)
  • Update to 5.7.10
    • no upstream changelog
  • Update to 5.7.9
    • Update JQuery dependency to version 3.4.1 to fix security vulnerability (CVE-2019-11358)
    • Update from preact to React
Record
openSUSE-SU-2024:0231-1
Updated
2026-11-02
OSVPYSEC-2021-118 No score

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.

Record
PYSEC-2021-118
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
notebook
PyPI
before 5.7.11
5.7.11
notebook
PyPI
6.0.0 up to 6.4.1
6.4.1
jupyter-base-notebook
Bitnami
5.7.0 up to 5.7.11, 6.4.0 up to 6.4.1
5.7.116.4.1
jupyter-notebook
Bitnami
5.7.0 up to 5.7.11, 6.4.0 up to 6.4.1
5.7.116.4.1
jupyter-notebook
Debian:12
before 6.4.3-1
6.4.3-1
jupyter-notebook
Debian:13
before 6.4.3-1
6.4.3-1
jupyter-notebook
Debian:14
before 6.4.3-1
6.4.3-1
notebook
PyPI
before 5.7.11, plus listed versions
0.0.04.0.04.0.14.0.24.0.4
Show 45 moreShow less
4.0.54.0.64.1.04.2.04.2.0b14.2.14.2.24.2.34.3.04.3.14.3.24.4.04.4.15.0.05.0.0b15.0.0b25.0.0rc15.0.0rc25.1.05.1.0rc15.1.0rc25.1.0rc35.2.05.2.0rc15.2.15.2.1rc15.2.25.3.05.3.0rc15.3.15.4.05.4.15.5.05.5.0rc15.6.05.6.0rc15.7.05.7.15.7.105.7.25.7.35.7.45.7.55.7.65.7.8
5.7.11
notebook
PyPI
6.0.0 up to 6.4.1, plus listed versions
6.0.16.0.26.0.36.1.06.1.0rc1
Show 12 moreShow less
6.1.16.1.26.1.36.1.46.1.56.1.66.2.06.3.06.4.06.4.0a06.4.0a16.4.0rc0
6.4.1
notebook
PyPI
5.7.0 up to 5.7.11, plus listed versions
5.7.15.7.105.7.25.7.35.7.4
Show 4 moreShow less
5.7.55.7.65.7.85.7.9
5.7.11
Show 4 moreShow less
Affected packages
PackageAffectedFixed
jupyter-notebook
Ubuntu:18.04:LTS
All versions, plus listed versions
4.2.3-45.1.0-25.2.1-25.2.2-15.2.2-1ubuntu0.1
None known
jupyter-notebook
Ubuntu:20.04:LTS
All versions, plus listed versions
5.7.8-16.0.0-16.0.0-26.0.2-16.0.3-16.0.3-26.0.3-2ubuntu0.1
None known
python-notebook
SUSE:Package Hub 15 SP6
From an advisory covering 2 CVEs
before 5.7.11-bp156.4.3.1
5.7.11-bp156.4.3.1
python-notebook
openSUSE:Leap 15.6
From an advisory covering 2 CVEs
before 5.7.11-bp156.4.3.1
5.7.11-bp156.4.3.1

History

History
RecordedChangedSources
affected
factsOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-32798 is a critical vulnerability (CVSS 10.0) in Jupyter Notebook, published August 9, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.11%, the 81st percentile. Fixed in notebook 5.7.11.

References

Show 7 moreShow less
This page doesn't list everything

Left out here: 1 version. The JSON record has them.

MoveEnter Open