nbviewer through 1.0.1 contains a path traversal vulnerability in LocalFileHandler.can_show() that uses string-prefix comparison instead of proper path validation. Attackers can read files from sibling directories outside the configured root by requesting paths that share the root as a textual prefix, disclosing unintended notebooks and credentials.
https://www.vulncheck.com/advisories/nbviewer-through-1.0.1-path-traversal-via-localfilehandler
https://github.com/jupyter/nbviewer/issues/1115
https://github.com/jupyter/nbviewer/commit/aad36106f72a1ca7721310c6fccc677ce4c744a5
https://github.com/jupyter/nbviewer/blob/1.0.1/nbviewer/providers/local/handlers.py#L92-L107
Published: 2026-09-06
Updated: 2026-09-06
Base Score: 5.4
Vector: CVSS2#AV:N/AC:H/Au:N/C:C/I:N/A:N
Severity: Medium
Base Score: 5.9
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Severity: Medium
Base Score: 8.2
Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Severity: High