{"answers":{"affected":"3 open source packages ship an affected version, including notebook. It affects 1 product.","exploited":"There is no known exploitation of CVE-2018-19351 in the wild and no public exploit code.","fix":"Upgrade notebook to 5.7.1 or later.","what":"CVE-2018-19351 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Nov 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2018-19351 and fix it if it is affected.\n\nWhat it is: CVE-2018-19351 is a medium-severity cross-site scripting vulnerability in n/a, published on 18 Nov 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2018-19351 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- notebook (PyPI): affected all versions; fixed in 5.7.1\n- notebook (PyPI): affected all versions; fixed in 5.7.1\n- notebook (PyPI): affected all versions; fixed in 5.7.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2018-19351/ (Markdown: https://insights.sbomify.com/CVE-2018-19351/index.md)","id":"CVE-2018-19351","markdown":"https://insights.sbomify.com/CVE-2018-19351/index.md","name":"CVE-2018-19351","record":{"aliases":["DEBIAN-CVE-2018-19351","GHSA-49qr-xh3w-h436","PYSEC-2018-17","UBUNTU-CVE-2018-19351"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter Notebook","requires_auth":"none","summary":"Attackers can execute JavaScript with server API access via untrusted notebooks due to missing Content Security Policy headers in nbconvert handlers.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"notebook","vendor":"jupyter"}],"cvss":{"score":6.1,"severity":"medium","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Jupyter Notebook XSS via untrusted notebooks","id":"CVE-2018-19351","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2018"},"n_packages":3,"n_references":5,"next":{"headline":"Jupyter Notebook XSS via directory name","id":"CVE-2018-19352"},"packages":[{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":null,"source":"GHSA-49qr-xh3w-h436"},{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"GHSA-49qr-xh3w-h436"},{"ecosystem":"PyPI","fixed":["5.7.1"],"introduced":["0"],"last_affected":[],"package":"notebook","purl":"pkg:pypi/notebook","source":"PYSEC-2018-17"}],"prev":{"headline":"Cross-site scripting in n/a","id":"CVE-2018-19350"},"products":["n/a"],"published":"2018-11-18","related":[{"cvss_score":10,"headline":"Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in notebook","id":"CVE-2021-32798","kev_date_added":null,"published":"2021-08-09"},{"cvss_score":7.8,"headline":"Jupyter Notebook file bypasses sanitization, executes JavaScript","id":"CVE-2018-8768","kev_date_added":null,"published":"2018-03-18"},{"cvss_score":7.5,"headline":"Insertion of Sensitive Information into Log File affects Jupyter Notebook","id":"CVE-2022-24758","kev_date_added":null,"published":"2022-03-31"},{"cvss_score":6.1,"headline":"Jupyter Notebook open redirect vulnerability","id":"CVE-2019-10856","kev_date_added":null,"published":"2019-04-04"},{"cvss_score":6.1,"headline":"Jupyter Notebook XSS via directory name","id":"CVE-2018-19352","kev_date_added":null,"published":"2018-11-18"},{"cvss_score":5.4,"headline":"Improper Neutralization of Input During Web Page Generation in Jupyter Notebook","id":"CVE-2019-9644","kev_date_added":null,"published":"2019-03-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"Attackers can execute JavaScript with server API access via untrusted notebooks due to missing Content Security Policy headers in nbconvert handlers.","url":"https://insights.sbomify.com/CVE-2018-19351/"}