# CVE-2023-37898: Safe mode Cross-site Scripting (XSS) vulnerability in Joplin

- Severity: High 8.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.63%, higher than 44% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-06-21T19:45:19.982Z
- Modified: 2026-06-17T06:08:51.463Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- laurent22 joplin: < 2.12.9
- laurent_22 joplin: before 2.12.9
- joplin_project joplin: before 2.12.9

## Every score

- GitHub_M: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/laurent22/joplin/security/advisories/GHSA-hjmq-3qh4-g2r8> (exploit, vendor-advisory)
- <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox> (technical-description)

## Sources

- CVE List: [CVE-2023-37898](https://www.cve.org/CVERecord?id=CVE-2023-37898), CVE Terms of Use, modified 2024-08-02
- NVD: [CVE-2023-37898](https://nvd.nist.gov/vuln/detail/CVE-2023-37898), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-37898 · Whole record: https://cve.day/CVE-2023-37898.json · Rebuilt by cve.day 2026-11-25T22:58:34.176Z
