{"answers":{"affected":"3 open source packages ship an affected version, including jupyter-server. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-40170 in the wild and no public exploit code.","fix":"Upgrade jupyter-server to 2.7.2 or later.","what":"CVE-2023-40170 is a medium-severity vulnerability in jupyter-server jupyter_server, published on 28 Aug 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-40170 and fix it if it is affected.\n\nWhat it is: CVE-2023-40170 is a medium-severity vulnerability in jupyter-server jupyter_server, published on 28 Aug 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2023-40170 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- jupyter-server (PyPI): affected all versions; fixed in 2.7.2\n- jupyter-server (PyPI): affected all versions; fixed in 2.7.2\n- jupyter-server (PyPI): affected all versions; fixed in 2.7.2\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-2023-40170/ (Markdown: https://insights.sbomify.com/CVE-2023-40170/index.md)","id":"CVE-2023-40170","markdown":"https://insights.sbomify.com/CVE-2023-40170/index.md","name":"CVE-2023-40170","record":{"aliases":["DEBIAN-CVE-2023-40170","GHSA-64x5-55rw-9974","PYSEC-2023-157","UBUNTU-CVE-2023-40170"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Jupyter server backend","requires_auth":"low_privilege","summary":"Attackers can expose file contents or access files via untrusted links due to improper cross-site credential checks in Jupyter server.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"jupyter_server","vendor":"jupyter"}],"cvss":{"score":4.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-306","name":"Missing Authentication for Critical Functionality"},{"id":"CWE-284","name":"Improper Access Control"}],"description":"jupyter-server is the backend for Jupyter web applications. Improper cross-site credential checks on `/files/` URLs could allow exposure of certain file contents, or accessing files when opening untrusted files via  \"Open image in new tab\". This issue has been addressed in commit `87a49272728` which has been included in release `2.7.2`. Users are advised to upgrade. Users unable to upgrade may use the lower performance `--ContentsManager.files_handler_class=jupyter_server.files.handlers.FilesHandler`, which implements the correct checks.","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":"cross-site inclusion (XSSI) of files in jupyter-server","id":"CVE-2023-40170","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"Dispatch writes JWT tokens in error message","id":"CVE-2023-40171"},"packages":[{"ecosystem":"PyPI","fixed":["2.7.2"],"introduced":["0"],"last_affected":[],"package":"jupyter-server","purl":null,"source":"GHSA-64x5-55rw-9974"},{"ecosystem":"PyPI","fixed":["2.7.2"],"introduced":["0"],"last_affected":[],"package":"jupyter-server","purl":"pkg:pypi/jupyter-server","source":"GHSA-64x5-55rw-9974"},{"ecosystem":"PyPI","fixed":["2.7.2"],"introduced":["0"],"last_affected":[],"package":"jupyter-server","purl":"pkg:pypi/jupyter-server","source":"PYSEC-2023-157"}],"prev":{"headline":"Malicious projects can read and upload arbitrary files from disk in TurboWarp Desktop","id":"CVE-2023-40168"},"products":["jupyter_server"],"published":"2023-08-28","related":[{"cvss_score":9.3,"headline":"Jupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSP","id":"CVE-2026-44727","kev_date_added":null,"published":"2026-06-22"},{"cvss_score":7.6,"headline":"jupyter-server path traversal allows access to sibling directories sharing root_dir name prefix","id":"CVE-2026-35397","kev_date_added":null,"published":"2026-05-05"},{"cvss_score":7.6,"headline":"jupyter-server CORS origin validation bypass via unanchored regex in allow_origin_pat","id":"CVE-2026-40110","kev_date_added":null,"published":"2026-05-05"},{"cvss_score":7.6,"headline":"jupyter-server authentication cookies remain valid after password reset due to static cookie secret","id":"CVE-2026-40934","kev_date_added":null,"published":"2026-05-05"},{"cvss_score":7.5,"headline":"Jupyter server on Windows discloses Windows user password hash","id":"CVE-2024-35178","kev_date_added":null,"published":"2024-06-06"},{"cvss_score":7.5,"headline":"Sensitive Auth \u0026 Cookie data stored in Jupyter server logs","id":"CVE-2022-24757","kev_date_added":null,"published":"2022-03-23"},{"cvss_score":7.1,"headline":"Known or guessable hidden files may be accessed in Jupyter Server","id":"CVE-2022-29241","kev_date_added":null,"published":"2022-06-14"}],"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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["jupyter-server"]},"summary":"Attackers can expose file contents or access files via untrusted links due to improper cross-site credential checks in Jupyter server.","url":"https://insights.sbomify.com/CVE-2023-40170/"}