Jupyter nbgrader Content Extraction Vulnerability via Frame-Ancestors Directive

Vulnerability

A vulnerability in Jupyter nbgrader has been identified, allowing users to extract content from the formgrader component by exploiting the Content Security Policy (CSP) frame-ancestors directive. This issue arises when JupyterHub is configured with 'enable_subdomains = False', the default setting. The vulnerability allows a user to craft a page that embeds formgrader in an iframe. When another user visits this page, their credentials are sent, and formgrader is loaded, giving the first user full access to the second user's formgrader content via JavaScript. This vulnerability affects nbgrader version 0.9.4 and has been patched in version 0.9.5.

Impact

Exploitation of this vulnerability allows for unauthorized access to formgrader content, potentially leading to a breach of user privacy and integrity of the grading process.

Reproduction

To reproduce this vulnerability, a user must first disable the 'frame-ancestors: self' directive in their JupyterHub configuration. Then, they can create a page that embeds the formgrader component in an iframe. When another user visits this page, the vulnerability is triggered, as their credentials are used to access formgrader content.

Remediation

Users are advised to upgrade to Jupyter nbgrader version 0.9.5. If an upgrade is not possible, the 'frame-ancestors: self' directive can be disabled, or JupyterHub subdomains can be enabled with 'JupyterHub.enable_subdomains = True'.

Added: Sep 1, 2025, 7:22 PM
Updated: Sep 1, 2025, 7:22 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
7.4
remediation
7.7
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.