CVE-2025-23205: nbgrader's `frame-ancestors Self` Grants All Users Access Vulnerability

HIGH
Advisory Identifier: GHSA-fcr8-4r9f-r66m
CWE-668 CWE-1021
Published
Advisory Summary

CVE-2025-23205 is a HIGH self` grants all users access vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting nbgrader's `frame-ancestors libraries in the PyPI ecosystem. The issue involves self` grants all users access to formgrader. Remediation is available by upgrading affected packages to version 0.9.5.

CVE-2025-23205 at a Glance

CVE Identifier CVE-2025-23205
GHSA Identifier GHSA-fcr8-4r9f-r66m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product nbgrader's `frame-ancestors
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-23205

To remediate this vulnerability, upgrade all affected nbgrader's `frame-ancestors dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nbgrader fixed: 0.9.5
pip install nbgrader>=0.9.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show nbgrader

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-23205, inspect your installed packages using pip:

pip show nbgrader

Analyze the terminal output to locate any version of nbgrader's `frame-ancestors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.5), your application is affected.

Note: The pip show nbgrader command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In nbgrader's `frame-ancestors, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Enabling frame-ancestors: 'self' grants any JupyterHub user the ability to extract formgrader content by sending malicious links to users with access to formgrader, at least when using the default JupyterHub configuration of `enable_subdomains = False`. #1915 disables a protection which would allow user Alice to craft a page embedding formgrader in an IFrame. If Bob visits that page, his credentials will be sent and the formgrader page loaded. Because Alice's page is on the same Origin as the formgrader iframe, Javasript on Alice's page has _full access_ to the contents of the page served by formgrader using Bob's credentials. ### Workarounds - Disable `frame-ancestors: self`, or - enable per-user and per-service subdomains with `JupyterHub.enable_subdomains = True` (then even if embedding in an IFrame is allowed, the host page does not have access to the contents of the frame). ### References JupyterHub documentation on why and when `frame-ancestors: self` is insecure, and why it was disabled by default: https://jupyterhub.readthedocs.io/en/stable/explanation/websecurity.html#:~:text=frame-ancestors

CVE-2025-23205 Affected nbgrader's `frame-ancestors Versions

1 component(s)
Fixed Versions:
0.9.5
Product / Package Ecosystem Affected Versions Fixed Version
nbgrader
PyPI
≥ 0.9.4
< 0.9.5
All 1 versions
0.9.4
0.9.5

References

Frequently Asked Questions

What is CVE-2025-23205?
CVE-2025-23205 is a security vulnerability in nbgrader's `frame-ancestors involving self` grants all users access to formgrader under CWE-668: Exposure of Resource to Wrong Sphere.
Which nbgrader's `frame-ancestors versions are affected?
Affected versions include releases prior to 0.9.5 across affected packages: nbgrader.
What version fixes CVE-2025-23205?
Upgrading to 0.9.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nbgrader affected?
Yes, nbgrader is affected in releases prior to 0.9.5. Upgrade your dependency to 0.9.5 or later.
What CWE is associated with CVE-2025-23205?
CVE-2025-23205 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check PyPI dependencies for CVE-2025-23205?
Run the dependency tree command: 'pip show nbgrader'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fcr8-4r9f-r66m",
  "modified" : "2025-01-17T21:56:51Z",
  "published" : "2025-01-17T16:29:16Z",
  "aliases" : [ "CVE-2025-23205" ],
  "summary" : "nbgrader's `frame-ancestors: self` grants all users access to formgrader",
  "details" : "### Impact\n\nEnabling frame-ancestors: 'self' grants any JupyterHub user the ability to extract formgrader content by sending malicious links to users with access to formgrader, at least when using the default JupyterHub configuration of `enable_subdomains = False`.\n\n#1915 disables a protection which would allow user Alice to craft a page embedding formgrader in an IFrame. If Bob visits that page, his credentials will be sent and the formgrader page loaded. Because Alice's page is on the same Origin as the formgrader iframe, Javasript on Alice's page has _full access_ to the contents of the page served by formgrader using Bob's credentials.\n\n### Workarounds\n\n- Disable `frame-ancestors: self`, or\n- enable per-user and per-service subdomains with `JupyterHub.enable_subdomains = True` (then even if embedding in an IFrame is allowed, the host page does not have access to the contents of the frame).\n\n### References\n\nJupyterHub documentation on why and when `frame-ancestors: self` is insecure, and why it was disabled by default: https://jupyterhub.readthedocs.io/en/stable/explanation/websecurity.html#:~:text=frame-ancestors",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nbgrader"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.9.4"
      }, {
        "fixed" : "0.9.5"
      } ]
    } ],
    "versions" : [ "0.9.4" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyter/nbgrader/security/advisories/GHSA-fcr8-4r9f-r66m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-23205"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyter/nbgrader/pull/1915"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyter/nbgrader/commit/73e137511ac1dc02e95790d4fd6d4d88dab42325"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyter/nbgrader"
  }, {
    "type" : "WEB",
    "url" : "https://jupyterhub.readthedocs.io/en/stable/explanation/websecurity.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1021", "CWE-668" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-17T16:29:16Z",
    "nvd_published_at" : "2025-01-17T21:15:11Z"
  }
}