CVE-2026-40262 Note Mark has Stored XSS via Unrestricted Asset Upload

High 8.7 Published Updated

An attacker can upload malicious HTML or SVG files that execute JavaScript in victims' browsers, potentially stealing sessions or performing actions.

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
Available

What is CVE-2026-40262?

CVE-2026-40262 is a high-severity cross-site scripting vulnerability in enchant97 note-mark, published on 16 Apr 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

Note Mark is an open-source note-taking application. In versions 0.19.1 and prior, the asset delivery handler serves uploaded files inline and relies on magic-byte detection for content type, which does not identify text-based formats such as HTML, SVG, or XHTML. These files are served with an empty Content-Type, no X-Content-Type-Options: nosniff header, and inline disposition, allowing browsers to sniff and render active content. An authenticated user can upload an HTML or SVG file containing JavaScript as a note asset, and when a victim navigates to the asset URL, the script executes under the application's origin with access to the victim's authenticated session and API actions. This issue has been fixed in version 0.19.2.

Weakness: CWE-79, CWE-434

Which versions are affected by CVE-2026-40262?

3 open source packages ship an affected version, including github.com/enchant97/note-mark/backend.

PackageAffectedFixed in
github.com/enchant97/note-mark/backend GoAll versions0.0.0-20260411145018-6bb62842ccb9
github.com/enchant97/note-mark/backend GoAll versions0.0.0-20260411145018-6bb62842ccb9
github.com/enchant97/note-mark/backend GoAll versions0.0.0-20260411145018-6bb62842ccb9

How do I fix CVE-2026-40262?

Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260411145018-6bb62842ccb9 or later.

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-40262 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40262 exists.

Sources

Also known as GHSA-9pr4-rf97-79qh, GO-2026-5295.

Is CVE-2026-40262 in your software?

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

Check your SBOMs for free