{"answers":{"affected":"3 open source packages ship an affected version, including github.com/enchant97/note-mark/backend.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40262 exists.","fix":"Upgrade github.com/enchant97/note-mark/backend to 0.0.0-20260411145018-6bb62842ccb9 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2026-40262 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40262 exists.\n\nAffected packages and fixed versions:\n- github.com/enchant97/note-mark/backend (Go): affected all versions; fixed in 0.0.0-20260411145018-6bb62842ccb9\n- github.com/enchant97/note-mark/backend (Go): affected all versions; fixed in 0.0.0-20260411145018-6bb62842ccb9\n- github.com/enchant97/note-mark/backend (Go): affected all versions; fixed in 0.0.0-20260411145018-6bb62842ccb9\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40262/ (Markdown: https://insights.sbomify.com/CVE-2026-40262/index.md)","id":"CVE-2026-40262","markdown":"https://insights.sbomify.com/CVE-2026-40262/index.md","name":"CVE-2026-40262","record":{"aliases":["GHSA-9pr4-rf97-79qh","GO-2026-5295"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Note Mark application","requires_auth":"low_privilege","summary":"An attacker can upload malicious HTML or SVG files that execute JavaScript in victims' browsers, potentially stealing sessions or performing actions.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-434","name":"Unrestricted Upload of File with Dangerous Type"}],"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Note Mark has Stored XSS via Unrestricted Asset Upload","id":"CVE-2026-40262","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":3,"n_references":3,"next":{"headline":"Note Mark: Username Enumeration via Login Endpoint Timing Side-Channel","id":"CVE-2026-40263"},"packages":[{"ecosystem":"Go","fixed":["0.0.0-20260411145018-6bb62842ccb9"],"introduced":["0"],"last_affected":[],"package":"github.com/enchant97/note-mark/backend","purl":null,"source":"GHSA-9pr4-rf97-79qh"},{"ecosystem":"Go","fixed":["0.0.0-20260411145018-6bb62842ccb9"],"introduced":["0"],"last_affected":[],"package":"github.com/enchant97/note-mark/backend","purl":"pkg:golang/github.com/enchant97/note-mark/backend","source":"GHSA-9pr4-rf97-79qh"},{"ecosystem":"Go","fixed":["0.0.0-20260411145018-6bb62842ccb9"],"introduced":["0"],"last_affected":[],"package":"github.com/enchant97/note-mark/backend","purl":"pkg:golang/github.com/enchant97/note-mark/backend","source":"GO-2026-5295"}],"prev":{"headline":"Composer has Command Injection via Malicious Perforce Reference","id":"CVE-2026-40261"},"products":["note-mark"],"published":"2026-04-16","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-04-18","vendors":["enchant97"]},"summary":"An attacker can upload malicious HTML or SVG files that execute JavaScript in victims' browsers, potentially stealing sessions or performing actions.","url":"https://insights.sbomify.com/CVE-2026-40262/"}