Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE-2021-41134
Summary
nbdime provides tools for diffing and merging of Jupyter Notebooks. In affected versions a stored cross-site scripting (XSS) issue exists within the Jupyter-owned nbdime project. It appears that when reading the file name and path from disk, the extension does not sanitize the string it constructs before returning it to be displayed. The diffNotebookCheckpoint function within nbdime causes this issue. When attempting to display the name of the local notebook (diffNotebookCheckpoint), nbdime appears to simply append .ipynb to the name of the input file. The NbdimeWidget is then created, and the base string is passed through to the request API function. From there, the frontend simply renders the HTML tag and anything along with it. Users are advised to patch to the most recent version of the affected product. This vulnerability affects "nbdime(npm)" versions prior to 5.0.2, 6.0.x versions prior to 6.0.1, 6.1.x prior to 6.1.2. "nbdime (pip)" versions prior to 1.1.1, 2.0.x prior to 2.1.1, 3.0.x prior to 3.1.1 "nbdime-jupyterlab" versions prior to 1.0.1, 2.0.x versions prior to 2.0.2 and 2.1.x versions prior to 2.1.1
- LOW
- NETWORK
- LOW
- CHANGED
- REQUIRED
- LOW
- LOW
- NONE
CWE-79 - Cross Site Scripting
Cross-Site Scripting, commonly referred to as XSS, is the most dominant class of vulnerabilities. It allows an attacker to inject malicious code into a pregnable web application and victimize its users. The exploitation of such a weakness can cause severe issues such as account takeover, and sensitive data exfiltration. Because of the prevalence of XSS vulnerabilities and their high rate of exploitation, it has remained in the OWASP top 10 vulnerabilities for years.
References
Advisory Timeline
- Published