CVE-2023-37898
JSON

8.2high

Safe mode Cross-site Scripting (XSS) vulnerability in Joplin

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.63% (higher than 44% of CVEs)
Published
Last changed
Assigned by
GitHub_M

Description

Joplin is a free, open source note taking and to-do application. A Cross-site Scripting (XSS) vulnerability allows an untrusted note opened in safe mode to execute arbitrary code. `packages/renderer/MarkupToHtml.ts` renders note content in safe mode by surrounding it with <pre> and </pre>, without escaping any interior HTML tags. Thus, an attacker can create a note that closes the opening <pre> tag, then includes HTML that runs JavaScript. Because the rendered markdown iframe has the same origin as the toplevel document and is not sandboxed, any scripts running in the preview iframe can access the top variable and, thus, access the toplevel NodeJS `require` function. `require` can then be used to import modules like fs or child_process and run arbitrary commands. This issue has been addressed in version 2.12.9 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
laurent22 joplin< 2.12.9CVE List
laurent_22 joplinbefore 2.12.9CVE List
joplin_project joplinbefore 2.12.9NVD

All scores

GitHub_M8.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Joplin is a free, open source note taking and to-do application. A Cross-site Scripting (XSS) vulnerability allows an untrusted note opened in safe mode to execute arbitrary code. `packages/renderer/MarkupToHtml.ts` renders note content in safe mode by surrounding it with <pre> and </pre>, without escaping any interior HTML tags. Thus, an attacker can create a note that closes the opening <pre> tag, then includes HTML that runs JavaScript. Because the rendered markdown iframe has the same origin as the toplevel document and is not sandboxed, any scripts running in the preview iframe can access the top variable and, thus, access the toplevel NodeJS `require` function. `require` can then be used to import modules like fs or child_process and run arbitrary commands. This issue has been addressed in version 2.12.9 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

NVD (es)

Joplin es una aplicación gratuita y de código abierto para tomar notas y tareas pendientes. Una vulnerabilidad de Cross-Site Scripting (XSS) permite que una nota que no es de confianza abierta en modo seguro ejecute código arbitrario. `packages/renderer/MarkupToHtml.ts` muestra el contenido de la nota en modo seguro rodeándolo con <pre> y </pre>, sin escapar de ninguna etiqueta HTML interior. Por lo tanto, un atacante puede crear una nota que cierre la etiqueta <pre> de apertura y luego incluya HTML que ejecute JavaScript. Debido a que el iframe de rebajas renderizado tiene el mismo origen que el documento de nivel superior y no está en un espacio aislado, cualquier script que se ejecute en el iframe de vista previa puede acceder a la variable superior y, por lo tanto, acceder a la función `require` de NodeJS de nivel superior. Luego, `require` se puede usar para importar módulos como fs o child_process y ejecutar comandos arbitrarios. Este problema se solucionó en la versión 2.12.9 y se recomienda a todos los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.</pre>

References

Sources

SourceRecordLicence
CVE ListCVE-2023-37898 changed 2024-08-02CVE Terms of Use
NVDCVE-2023-37898 changed 2026-06-17Public domain