{"schema_version":"1.7.5","id":"GHSA-hwvq-6gjx-j797","published":"2021-08-23T19:40:38Z","modified":"2026-03-13T22:15:42.943072Z","aliases":["BIT-jupyter-base-notebook-2021-32798","BIT-jupyter-notebook-2021-32798","CVE-2021-32798","PYSEC-2021-118"],"related":["CVE-2021-32798"],"summary":"Special Element Injection in notebook","details":"### 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````","affected":[{"package":{"name":"notebook","ecosystem":"PyPI","purl":"pkg:pypi/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"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-hwvq-6gjx-j797/GHSA-hwvq-6gjx-j797.json"}},{"package":{"name":"notebook","ecosystem":"PyPI","purl":"pkg:pypi/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"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-hwvq-6gjx-j797/GHSA-hwvq-6gjx-j797.json"}}],"references":[{"type":"WEB","url":"https://github.com/jupyter/notebook/security/advisories/GHSA-hwvq-6gjx-j797"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32798"},{"type":"WEB","url":"https://github.com/jupyter/notebook/commit/79fc76e890a8ec42f73a3d009e44ef84c14ef0d5"},{"type":"PACKAGE","url":"https://github.com/jupyter/notebook"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2021-118.yaml"}],"database_specific":{"cwe_ids":["CWE-75","CWE-79","CWE-80"],"github_reviewed":true,"github_reviewed_at":"2021-08-23T16:44:43Z","nvd_published_at":"2021-08-09T21:15:00Z","severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"},{"type":"CVSS_V4","score":"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"}]}