{"id":"CVE-2021-32798","aliases":["BIT-jupyter-base-notebook-2021-32798","BIT-jupyter-notebook-2021-32798","DEBIAN-CVE-2021-32798","EUVD-2021-0149","GHSA-hwvq-6gjx-j797","PYSEC-2021-118","UBUNTU-CVE-2021-32798","openSUSE-SU-2024:0231-1"],"status":"published","title":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","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.","severity":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02106,"percentile":0.81992,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-75","CWE-79","CWE-80"],"published":"2021-08-09T20:50:10Z","modified":"2026-11-06T02:45:05Z","fixes":[{"ecosystem":"PyPI","package":"notebook","fixed_in":["5.7.11","6.4.1"],"sources":["ghsa","osv"]},{"ecosystem":"Bitnami","package":"jupyter-base-notebook","fixed_in":["5.7.11","6.4.1"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"jupyter-notebook","fixed_in":["5.7.11","6.4.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"jupyter-notebook","fixed_in":["6.4.3-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"jupyter-notebook","fixed_in":["6.4.3-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"jupyter-notebook","fixed_in":["6.4.3-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.11"}]}]},{"source":"ghsa","ecosystem":"PyPI","package":"notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.4.1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"jupyter-base-notebook","ranges":[{"type":"SEMVER","events":[{"introduced":"5.7.0"},{"fixed":"5.7.11"},{"introduced":"6.4.0"},{"fixed":"6.4.1"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"jupyter-notebook","ranges":[{"type":"SEMVER","events":[{"introduced":"5.7.0"},{"fixed":"5.7.11"},{"introduced":"6.4.0"},{"fixed":"6.4.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.3-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.3-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.4.3-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.11"}]}],"versions":["0.0.0","4.0.0","4.0.1","4.0.2","4.0.4","4.0.5","4.0.6","4.1.0","4.2.0","4.2.0b1","4.2.1","4.2.2","4.2.3","4.3.0","4.3.1","4.3.2","4.4.0","4.4.1","5.0.0","5.0.0b1","5.0.0b2","5.0.0rc1","5.0.0rc2","5.1.0","5.1.0rc1","5.1.0rc2","5.1.0rc3","5.2.0","5.2.0rc1","5.2.1","5.2.1rc1","5.2.2","5.3.0","5.3.0rc1","5.3.1","5.4.0","5.4.1","5.5.0","5.5.0rc1","5.6.0","5.6.0rc1","5.7.0","5.7.1","5.7.10","5.7.2","5.7.3","5.7.4","5.7.5","5.7.6","5.7.8","5.7.9"]},{"source":"osv","ecosystem":"PyPI","package":"notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.4.1"}]}],"versions":["6.0.0","6.0.1","6.0.2","6.0.3","6.1.0","6.1.0rc1","6.1.1","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.2.0","6.3.0","6.4.0","6.4.0a0","6.4.0a1","6.4.0rc0"]},{"source":"osv","ecosystem":"PyPI","package":"notebook","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"79fc76e890a8ec42f73a3d009e44ef84c14ef0d5"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.7.0"},{"fixed":"5.7.11"}]}],"versions":["5.7.0","5.7.1","5.7.10","5.7.2","5.7.3","5.7.4","5.7.5","5.7.6","5.7.8","5.7.9"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.2.3-4","5.1.0-2","5.2.1-2","5.2.2-1","5.2.2-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"jupyter-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5.7.8-1","6.0.0-1","6.0.0-2","6.0.2-1","6.0.3-1","6.0.3-2","6.0.3-2ubuntu0.1"]},{"source":"osv","ecosystem":"SUSE:Package Hub 15 SP6","package":"python-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.11-bp156.4.3.1"}]}],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Leap 15.6","package":"python-notebook","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.11-bp156.4.3.1"}]}],"bundled":2}],"products":[{"vendor":"jupyter","product":"notebook"}],"references":[{"url":"https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","advisory","evidence","web","fix","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32798","tags":["web","advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2021-118.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hwvq-6gjx-j797"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-32798","tags":["advisory"]},{"url":"https://github.com/jupyter/notebook","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2021-32798","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-32798","tags":["report"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/MGXYA34Z6RRQFK6OU2VOIH22CODOT5ES/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1227583","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2019-11358","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-32798","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-32798","title":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","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.","status":"published","published":"2021-08-09T20:50:10Z","modified":"2024-08-03T23:33:55.864Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:33:07.014772Z"}],"euvd":[{"id":"EUVD-2021-0149","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.","status":"published","published":"2021-08-09T20:50:10Z","modified":"2024-08-03T23:33:55Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-03T03:24:35.855495Z"}],"ghsa":[{"id":"GHSA-hwvq-6gjx-j797","title":"Special Element Injection in notebook","description":"### Impact\n\nUntrusted notebook can execute code on load. This is a remote code execution, but requires user action to open a notebook.\n\n### Patches\n\n5.7.11, 6.4.1\n\n### References\n\n[OWASP Page on Injection Prevention](https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html#injection-prevention-rules)\n\n### For more information\n\nIf you have any questions or comments about this advisory, or vulnerabilities to report, please email our security list security@ipython.org.\n\nCredit: Guillaume Jeanne from Google\n\n\n### Example:\n\nA 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):\n\n```\n{ \"cell_type\": \"code\", \"execution_count\": 0, \"metadata\": {}, \"outputs\": [ { \"data\": { \"text/html\": [ \"\u003cselect\u003e\u003ciframe\u003e\u003c/select\u003e\u003cimg src=x: onerror=alert('xss')\u003e\\n\"], \"text/plain\": [] }, \"metadata\": {}, \"output_type\": \"display_data\" } ], \"source\": [ \"\" ] }\n````","status":"published","published":"2021-08-23T19:40:38Z","modified":"2024-10-01T21:17:39Z","cvss":[{"version":"4.0","score":7.8,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","level":"high"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-75","CWE-79","CWE-80"],"updated_at":"2026-11-02T14:38:07.852618Z"}],"nvd":[{"id":"CVE-2021-32798","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.","status":"published","published":"2021-08-09T21:15:08.233Z","modified":"2026-06-17T03:53:39.107Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"CVE-2021-32798","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.","status":"published","published":"2021-08-09T21:15:08.233Z","modified":"2026-11-06T02:45:05.864289081Z","cvss":[{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-06T03:04:11.655443Z"},{"id":"DEBIAN-CVE-2021-32798","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.","status":"published","published":"2021-08-09T21:15:08.233Z","modified":"2026-10-23T18:03:14.788783Z","cvss":[{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:35.233346Z"},{"id":"GHSA-hwvq-6gjx-j797","title":"Special Element Injection in notebook","description":"### Impact\n\nUntrusted notebook can execute code on load. This is a remote code execution, but requires user action to open a notebook.\n\n### Patches\n\n5.7.11, 6.4.1\n\n### References\n\n[OWASP Page on Injection Prevention](https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html#injection-prevention-rules)\n\n### For more information\n\nIf you have any questions or comments about this advisory, or vulnerabilities to report, please email our security list security@ipython.org.\n\nCredit: Guillaume Jeanne from Google\n\n\n### Example:\n\nA 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):\n\n```\n{ \"cell_type\": \"code\", \"execution_count\": 0, \"metadata\": {}, \"outputs\": [ { \"data\": { \"text/html\": [ \"\u003cselect\u003e\u003ciframe\u003e\u003c/select\u003e\u003cimg src=x: onerror=alert('xss')\u003e\\n\"], \"text/plain\": [] }, \"metadata\": {}, \"output_type\": \"display_data\" } ], \"source\": [ \"\" ] }\n````","status":"published","published":"2021-08-23T19:40:38Z","modified":"2026-09-10T03:49:27.336198181Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"},{"version":"4.0","score":7.8,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","level":"high"}],"cwes":["CWE-75","CWE-79","CWE-80"],"updated_at":"2026-11-02T15:46:49.621585Z"},{"id":"UBUNTU-CVE-2021-32798","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.","status":"published","published":"2021-08-09T21:15:00Z","modified":"2025-10-24T04:50:21Z","cvss":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","level":"critical"},{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:27.332852Z"},{"id":"BIT-jupyter-base-notebook-2021-32798","title":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","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.","status":"published","published":"2024-03-06T10:54:32.367Z","modified":"2026-09-08T08:48:23.733366413Z","updated_at":"2026-11-02T15:28:31.782692Z"},{"id":"BIT-jupyter-notebook-2021-32798","title":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","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.","status":"published","published":"2024-03-06T10:54:36.287Z","modified":"2026-09-08T08:48:23.685279543Z","updated_at":"2026-11-02T15:28:31.782692Z"},{"id":"openSUSE-SU-2024:0231-1","title":"Security update for python-notebook","description":"This update for python-notebook fixes the following issues:\n\n- Update to 5.7.11\n  * sanitizer fix CVE-2021-32798 (boo#1227583)\n- Update to 5.7.10\n  * no upstream changelog\n- Update to 5.7.9\n  * Update JQuery dependency to version 3.4.1 to fix security\n    vulnerability (CVE-2019-11358)\n  * Update from preact to React \n","status":"published","published":"2024-08-02T10:51:39Z","modified":"2026-02-04T03:36:31.306086Z","updated_at":"2026-11-02T16:58:33.135986Z"},{"id":"PYSEC-2021-118","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.","status":"published","published":"2021-08-09T21:15:00Z","modified":"2023-12-06T01:01:15.85693Z","updated_at":"2026-11-02T15:52:52.682031Z"}]}}
