{"id":"CVE-2021-32798","aliases":["GHSA-hwvq-6gjx-j797","BIT-jupyter-base-notebook-2021-32798","BIT-jupyter-notebook-2021-32798","PYSEC-2021-118"],"title":"Special Element Injection in notebook","summary":"Special Element Injection in notebook","severity":"critical","cvss":10,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N","vendor":"notebook","product":"notebook","ecosystem":"pip","affected":["notebook < 5.7.11","notebook >= 6.0.0, < 6.4.1"],"patched":["notebook 5.7.11","notebook 6.4.1"],"published":"2021-08-23","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:49:27.336198181Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-hwvq-6gjx-j797","references":[{"url":"https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32798"},{"url":"https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5"},{"url":"https://github.com/jupyter/notebook"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2021-118.yaml"}],"tags":["osv","pip"],"epss":0.02106,"epssPercentile":0.80941,"ingestedAt":"2026-09-12T03:13:01.703Z","slug":"CVE-2021-32798","body":"## Overview\n\n### 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\": [ \"<select><iframe></select><img src=x: onerror=alert('xss')>\\n\"], \"text/plain\": [] }, \"metadata\": {}, \"output_type\": \"display_data\" } ], \"source\": [ \"\" ] }\n````\n\n## Affected packages\n\n- `notebook < 5.7.11`\n- `notebook >= 6.0.0, < 6.4.1`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `notebook 5.7.11`\n- `notebook 6.4.1`","depth":"midnight","depthScore":55,"depthScoreParts":{"impact":55,"likelihood":0.4,"exploitation":0,"ransomware":0},"changes":[]}