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

Medium 5.4 Published Updated

Attackers can inject malicious scripts via Twitter embed URLs in Notesnook, potentially stealing user data or taking over accounts.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-31876?

CVE-2026-31876 is a medium-severity cross-site scripting vulnerability in streetwriters notesnook, published on 11 Mar 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2026-31876?

It affects 2 products.

Products include Streetwriters Notesnook Desktop, Streetwriters Notesnook Mobile.

How do I fix CVE-2026-31876?

No fix has been published for CVE-2026-31876 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-31876 being exploited?

There is no known exploitation of CVE-2026-31876 in the wild and no public exploit code.

Sources

Also known as GHSA-jprx-2w2h-4rh5.

Is CVE-2026-31876 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free