# CVE-2026-31876: Notesnook has Stored XSS via unsanitized Twitter/X embed URL in editor (`tweetToEmbed`)

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- 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.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-03-11T18:17:08.142Z
- Modified: 2026-06-17T10:34:40.833Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Notesnook is a note-taking app focused on user privacy & ease of use. Prior to 3.3.9, a Stored Cross-Site Scripting (XSS) vulnerability existed in Notesnook's editor embed component when rendering Twitter/X embed URLs. The tweetToEmbed() function in component.tsx interpolated the user-supplied URL directly into an HTML string without escaping, which was then assigned to the srcdoc attribute of an <iframe>. This vulnerability is fixed in 3.3.9.

(As written by CVE List.)

## Affected

- streetwriters notesnook: < 3.3.9
- streetwriters notesnook_desktop: before 3.3.9
- streetwriters notesnook_mobile: before 3.3.15

## References

- <https://github.com/streetwriters/notesnook/security/advisories/GHSA-jprx-2w2h-4rh5> (vendor-advisory)
- <https://github.com/streetwriters/notesnook/commit/e87f5e5f899f45df28d7c0f33f15e9178d1fbcb7> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2026-31876 · Whole record: https://cve.day/CVE-2026-31876.json · Rebuilt by cve.day 2026-11-25T22:59:15.765Z
