Impact
The vulnerability is a path traversal flaw in nbviewer’s LocalFileHandler.can_show() method, which relies on a simple string-prefix check instead of validating absolute file paths. This weakness allows an attacker to read arbitrary files located in directories adjacent to the configured root, including notebooks and credential files. The vulnerability falls under CWE‑22 and can lead to confidentiality breaches. The impact is the unauthorized disclosure of files that should be protected, potentially exposing sensitive data.
Affected Systems
Jupyter nbviewer versions 1.0.1 and earlier are affected. Any deployment of nbviewer that uses the LocalFileHandler component and has not applied the fix noted in the referenced commit or later releases is vulnerable. Existing installations should verify the exact version they are running to determine if they fall within the affected range.
Risk and Exploitability
The CVSS score of 8.2 classifies this issue as high severity. The EPSS score is not available, so the exploitation probability is unknown, but the flaw can be triggered by a crafted HTTP request to the nbviewer server and does not require any privileged access. It is not listed in the CISA KEV catalog at this time. An attacker with network access to the nbviewer instance can construct a path that shares the configured root as a textual prefix, causing the server to resolve to a file outside the intended directory and return its contents. The attack path is straightforward and does not rely on code execution or advanced privilege escalation.
OpenCVE Enrichment