Skip to main content

CVE-2022-29241: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in jupyter-server jupyter_server

Medium
Published: Tue Jun 14 2022 (06/14/2022, 20:40:15 UTC)
Source: CVE
Vendor/Project: jupyter-server
Product: jupyter_server

Description

Jupyter Server provides the backend (i.e. the core services, APIs, and REST endpoints) for Jupyter web applications like Jupyter Notebook. Prior to version 1.17.1, if notebook server is started with a value of `root_dir` that contains the starting user's home directory, then the underlying REST API can be used to leak the access token assigned at start time by guessing/brute forcing the PID of the jupyter server. While this requires an authenticated user session, this URL can be used from a cross-site scripting payload or from a hooked or otherwise compromised browser to leak this access token to a malicious third party. This token can be used along with the REST API to interact with Jupyter services/notebooks such as modifying or overwriting critical files, such as .bashrc or .ssh/authorized_keys, allowing a malicious user to read potentially sensitive data and possibly gain control of the impacted system. This issue is patched in version 1.17.1.

AI-Powered Analysis

AILast updated: 06/23/2025, 06:20:43 UTC

Technical Analysis

CVE-2022-29241 is a vulnerability in the jupyter-server project, specifically affecting versions prior to 1.17.1. Jupyter Server acts as the backend for Jupyter web applications, including Jupyter Notebook, providing core services, APIs, and REST endpoints. The vulnerability arises when the notebook server is started with a root_dir configuration that includes the starting user's home directory. Under these conditions, an attacker with an authenticated user session can exploit the REST API to leak the access token assigned at server startup by guessing or brute forcing the process ID (PID) of the Jupyter server. This access token is critical as it grants access to the REST API, enabling interactions with Jupyter services and notebooks. The attack vector includes leveraging cross-site scripting (XSS) payloads or compromised browsers to exfiltrate the token to malicious actors. Once obtained, the token allows the attacker to perform unauthorized actions such as reading sensitive data and modifying or overwriting critical files like .bashrc or .ssh/authorized_keys. Such modifications can lead to persistent system compromise, including privilege escalation or unauthorized remote access. The vulnerability requires an authenticated session, which limits exposure to some extent, but the ability to leak tokens through XSS or browser compromise significantly raises the risk. The issue was addressed and patched in jupyter-server version 1.17.1, mitigating the token leakage by preventing unauthorized access via the REST API. No known exploits in the wild have been reported to date, but the potential impact on confidentiality and system integrity is significant if exploited.

Potential Impact

For European organizations, the impact of CVE-2022-29241 can be substantial, especially for entities relying on Jupyter Server for data science, research, or development environments. The exposure of access tokens can lead to unauthorized access to sensitive notebooks and backend services, risking leakage of intellectual property, personal data, or confidential research information. The ability to modify critical files such as .bashrc or .ssh/authorized_keys can result in persistent backdoors, enabling attackers to maintain long-term access and potentially move laterally within networks. This is particularly concerning for sectors like academia, finance, healthcare, and government institutions, where Jupyter environments are commonly used and data sensitivity is high. The requirement for an authenticated session reduces the attack surface but does not eliminate risk, especially in environments where user sessions are long-lived or where browser security is weak. The vulnerability also raises concerns about insider threats or compromised user accounts. Given the integration of Jupyter in cloud and on-premises environments, exploitation could disrupt availability by corrupting notebooks or server configurations, impacting business continuity and research productivity.

Mitigation Recommendations

European organizations should prioritize upgrading all jupyter-server instances to version 1.17.1 or later to apply the official patch that addresses this vulnerability. Beyond patching, organizations should implement strict access controls and session management policies to limit authenticated user sessions and reduce the risk of token leakage. Employ Content Security Policy (CSP) headers and other browser security mechanisms to mitigate cross-site scripting attacks that could exfiltrate tokens. Regularly audit and monitor REST API access logs for unusual activity, such as repeated PID guessing attempts or anomalous API calls. Restrict the root_dir configuration to exclude user home directories where feasible, minimizing exposure of sensitive files. Employ network segmentation to isolate Jupyter Server environments from critical infrastructure and sensitive data stores. Additionally, enforce multi-factor authentication (MFA) for user access to Jupyter services to reduce the risk of compromised credentials. Conduct user training on phishing and browser security hygiene to prevent browser compromise. Finally, implement file integrity monitoring on critical files like .bashrc and .ssh/authorized_keys to detect unauthorized modifications promptly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-04-13T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9843c4522896dcbf32ee

Added to database: 5/21/2025, 9:09:23 AM

Last enriched: 6/23/2025, 6:20:43 AM

Last updated: 8/1/2025, 12:06:59 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats