CVE-2022-29238: Notebook Token Bruteforcing. Vulnerability
MODERATECVE-2022-29238 is a MODERATE (CVSS 4.3) token bruteforcing. vulnerability (CWE-425: Direct Request ('Forced Browsing')) affecting Notebook libraries in the PyPI ecosystem. The issue involves token bruteforcing.. Remediation is available by upgrading affected packages to version 6.4.12.
CVE-2022-29238 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2022-29238
To remediate this vulnerability, upgrade all affected Notebook dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install notebook>=6.4.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show notebook
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-29238, inspect your installed packages using pip:
pip show notebook
Analyze the terminal output to locate any version of Notebook in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.4.12), your application is affected.
Note: The pip show notebook command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-425: Direct Request ('Forced Browsing'), where the web application does not adequately enforce appropriate authorization on all restricted urls, scripts, or files. In Notebook, 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
CVE-2022-29238 Affected Notebook Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
notebook
|
PyPI |
< 6.4.12
|
6.4.12
|
References
Frequently Asked Questions
What is CVE-2022-29238?
Which Notebook versions are affected?
What version fixes CVE-2022-29238?
Is notebook affected?
What is the CVSS score of CVE-2022-29238?
What CWE is associated with CVE-2022-29238?
How can I check PyPI dependencies for CVE-2022-29238?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v7vq-3x77-87vg",
"modified" : "2022-06-16T23:10:10Z",
"published" : "2022-06-16T23:10:10Z",
"aliases" : [ "CVE-2022-29238" ],
"summary" : "Token bruteforcing.",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nAuthenticated 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.\n\nBecause 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.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nnotebook 6.4.12\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n- Do not run the notebook server in a directory with hidden files, use subdirectories\n- Use a custom ContentsManager with additional checks for `self.is_hidden(path)` prior to completing actions\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "notebook"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.4.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jupyter/notebook/security/advisories/GHSA-v7vq-3x77-87vg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29238"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jupyter/notebook"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/notebook/PYSEC-2022-212.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-425" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-16T23:10:10Z",
"nvd_published_at" : "2022-06-14T18:15:00Z"
}
}