Description
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.
Severity (CVSS)
| Base score | 8.2 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| 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 |
| Provided by | CNA |
Weaknesses
- CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| jupyter | nbviewer | 0 to <=1.0.1 |
References
- https://github.com/jupyter/nbviewer/issues/1115 (issue-tracking)
- https://github.com/jupyter/nbviewer/blob/1.0.1/nbviewer/providers/local/handlers.py#L92-L107 (technical-description)
- https://github.com/jupyter/nbviewer/commit/aad36106f72a1ca7721310c6fccc677ce4c744a5 (patch)
- https://github.com/jupyter/nbviewer (product)
- https://www.vulncheck.com/advisories/nbviewer-through-1.0.1-path-traversal-via-localfilehandler (third-party-advisory)
Generated from the official CVE List on 07 Sep 2026 07:02 UTC.