Token bruteforcing
Medium4.3CVE-2022-29238 · Published Jun 16, 2022 · updated Dec 6, 2023
### Impact _What kind of vulnerability is it? Who is impacted?_ Authenticated requests to the notebook server with `ContentsManager.allow_hidden = False` only prevented listing the contents of hidden directories, not accessing individual hidden files or files in hidden directories (i.e. hidden files were 'hidden' but not 'inaccessible'). This could lead to notebook configurations allowing authenticated access to files that may reasonably be expected to be disallowed. Because fully authenticated requests are required, this is of relatively low impact. But if a server's root directory contains sensitive files whose only protection from the server is being hidden (e.g. `~/.ssh` while serving $HOME), then any authenticated requests could access files if their names are guessable. Such contexts also necessarily have full access to the server and therefore execution permissions, which also generally grants access to all the same files. So this does not generally result in any privilege escalation or increase in information access, only an additional, unintended _means_ by which the files could be accessed. ### Patches _Has the problem been patched? What versions should users upgrade t...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| notebook PyPI | < 6.4.12 | 6.4.12 |
Details and references
### Impact _What kind of vulnerability is it? Who is impacted?_ Authenticated requests to the notebook server with `ContentsManager.allow_hidden = False` only prevented listing the contents of hidden directories, not accessing individual hidden files or files in hidden directories (i.e. hidden files were 'hidden' but not 'inaccessible'). This could lead to notebook configurations allowing authenticated access to files that may reasonably be expected to be disallowed. Because fully authenticated requests are required, this is of relatively low impact. But if a server's root directory contains sensitive files whose only protection from the server is being hidden (e.g. `~/.ssh` while serving $HOME), then any authenticated requests could access files if their names are guessable. Such contexts also necessarily have full access to the server and therefore execution permissions, which also generally grants access to all the same files. So this does not generally result in any privilege escalation or increase in information access, only an additional, unintended _means_ by which the files could be accessed. ### Patches _Has the problem been patched? What versions should users upgrade to?_ notebook 6.4.12 ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ - Do not run the notebook server in a directory with hidden files, use subdirectories - Use a custom ContentsManager with additional checks for `self.is_hidden(path)` prior to completing actions ### References _Are there any links users can visit to find out more?_ ### For more information If you have any questions or comments about this advisory: * Open an issue in [example link to repo](http://example.com) * Email us at [example email address](mailto:example@example.com)
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-425
- Also known as
- BIT-jupyter-base-notebook-2022-29238, BIT-jupyter-notebook-2022-29238, CVE-2022-29238, PYSEC-2022-212
More Jupyter advisories
All Jupyter| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Aug 102022 | nbconvert vulnerable to cross-site scripting (XSS) via multiple exploit paths | Medium5.4 | 6.5.1 |
| Jun 162022 | Jupyter server Token bruteforcing | High7.1 | 1.17.1+1 more |
| May 242022 | Cross-Site Request Forgery in JupyterHub | Medium4.5 | 1.2.0b1 |
| May 172022 | Improper Input Validation in Jupyter Notebook | Critical9.8 | 4.0.5+1 more |
| May 142022 | Improper Neutralization of Input During Web Page Generation in Jupyter Notebook | Medium6.1 | 4.0.5+1 more |
| May 142022 | Improper Neutralization of Input During Web Page Generation in Jupyter Notebook | Medium5.4 | 5.7.6 |