CVE-2021-32797: JupyterLab: XSS due to lack of sanitization of the action attribute of an html <form>

Published Aug 9, 2021
·
Updated

Impact

Untrusted notebook can execute code on load. This is a remote code execution, but requires user action to open a notebook.

Patches

Patched in the following versions: 3.1.4, 3.0.17, 2.3.2, 2.2.10, 1.2.21.

References

OWASP Page on Restricting Form Submissions

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

Other sources

JupyterLab is a user interface for Project Jupyter which will eventually replace the classic Jupyter Notebook. In affected versions untrusted notebook can execute code on load. In particular JupyterLab doesn’t sanitize the action attribute of html <form>. Using this it is possible to trigger the form validation outside of the form itself. This is a remote code execution, but requires user action to open a notebook.

MITRE

Affected Software

12 affected componentsFixes available
pip/jupyterlab>=3.1.0a0<3.1.4
3.1.4
pip/jupyterlab>=3.0.0a0<3.0.17
3.0.17
pip/jupyterlab>=2.3.0a0<2.3.2
2.3.2
pip/jupyterlab>=2.0.0a0<2.2.10
2.2.10
pip/notebook>=6.0.0<6.4.1
6.4.1
pip/notebook<5.7.11
5.7.11
pip/jupyterlab<1.2.21
1.2.21
jupyter JupyterLab<1.2.21
jupyter JupyterLab>=2.0.0<2.2.10
jupyter JupyterLab>=2.3.0<2.3.2
jupyter JupyterLab>=3.0.0<3.0.17
jupyter JupyterLab>=3.1.0<3.1.4

Event History

Aug 9, 2021
CVE Published
via MITRE·08:45 PM
Data Sourced
via MITRE·08:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeaknessAffected Software
Aug 23, 2021
Advisory Published
via GitHub·07:40 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-32797?

CVE-2021-32797 is a vulnerability in JupyterLab that allows untrusted notebooks to execute code on load.

2

How does CVE-2021-32797 affect JupyterLab?

CVE-2021-32797 affects JupyterLab versions up to 1.2.21, 2.0.0 to 2.2.10, 2.3.0 to 2.3.2, 3.0.0 to 3.0.17, and 3.1.0 to 3.1.4.

3

What is the severity of CVE-2021-32797?

CVE-2021-32797 has a severity rating of 9.6, which is classified as critical.

4

How can the CVE-2021-32797 vulnerability be exploited?

The CVE-2021-32797 vulnerability can be exploited by using an untrusted notebook to trigger the execution of code on load in JupyterLab.

5

What is the Common Weakness Enumeration (CWE) ID for CVE-2021-32797?

The Common Weakness Enumeration (CWE) ID for CVE-2021-32797 is CWE-79.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203