CVE-2024-28233

8.1 HIGH

📋 TL;DR

CVE-2024-28233 is a cross-site scripting (XSS) vulnerability in JupyterHub that allows attackers to achieve full access to the JupyterHub API and user's single-user server by tricking users into visiting malicious subdomains. This affects single-origin JupyterHub deployments and deployments with user-controlled applications running on subdomains or peer subdomains. The vulnerability enables attackers to compromise user sessions and gain unauthorized access.

💻 Affected Systems

Products:
  • JupyterHub
Versions: All versions before 4.1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects single-origin deployments and deployments with user-controlled applications on subdomains or peer subdomains of Hub or single-user servers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full compromise of JupyterHub API access leading to complete control over user sessions, data theft, and potential lateral movement within the environment.

🟠

Likely Case

Session hijacking, unauthorized access to user notebooks and data, and potential privilege escalation within JupyterHub.

🟢

If Mitigated

Limited impact with proper subdomain isolation and content security policies in place.

🌐 Internet-Facing: HIGH - JupyterHub deployments exposed to the internet are directly vulnerable to exploitation via malicious subdomains.
🏢 Internal Only: MEDIUM - Internal deployments are still vulnerable if attackers can trick users into visiting malicious internal subdomains.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires social engineering to trick users into visiting malicious subdomains, but the technical execution is straightforward once the user is lured.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.1.0

Vendor Advisory: https://github.com/jupyterhub/jupyterhub/security/advisories/GHSA-7r3h-4ph8-w38g

Restart Required: Yes

Instructions:

1. Update JupyterHub to version 4.1.0 or later using pip: 'pip install --upgrade jupyterhub==4.1.0' 2. Restart the JupyterHub service 3. Verify the update was successful

🔧 Temporary Workarounds

Implement Content Security Policy

all

Add strict Content Security Policy headers to prevent XSS execution

Add 'Content-Security-Policy: default-src 'self'; script-src 'self';' to JupyterHub configuration

Subdomain Isolation

all

Ensure user applications are not hosted on subdomains or peer subdomains of Hub or single-user servers

Review and reconfigure JupyterHub deployment to avoid vulnerable subdomain configurations

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate JupyterHub from untrusted networks
  • Deploy web application firewall (WAF) with XSS protection rules

🔍 How to Verify

Check if Vulnerable:

Check JupyterHub version: if version is below 4.1.0 and deployment matches affected configurations, system is vulnerable

Check Version:

jupyterhub --version

Verify Fix Applied:

Verify JupyterHub version is 4.1.0 or higher using 'jupyterhub --version'

📡 Detection & Monitoring

Log Indicators:

  • Unusual subdomain access patterns
  • Multiple failed authentication attempts from unexpected subdomains
  • Suspicious JavaScript execution in user sessions

Network Indicators:

  • Requests to malicious subdomains
  • Unexpected cross-origin requests from JupyterHub sessions

SIEM Query:

source="jupyterhub" AND (url="*malicious-subdomain*" OR event="XSS_attempt")

🔗 References

📤 Share & Export