{"id":"CVE-2026-130866","summary":"Pastefy 7.2.1 before 7.2.7 Stored XSS via Mermaid Init Directive","details":"Pastefy 7.2.1 before 7.2.7 contains a stored cross-site scripting vulnerability in MermaidViewer.vue that passes attacker-supplied %%{init}%% directives to mermaid.mermaidAPI.updateSiteConfig(). Unauthenticated attackers can create Mermaid or Markdown pastes setting securityLevel to loose with a permissive dompurifyConfig to steal viewers' API session keys and act on their accounts.","modified":"2026-11-17T21:46:02.916667393Z","published":"2026-11-17T19:47:30.307Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/130xxx/CVE-2026-130866.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/130xxx/CVE-2026-130866.json"},{"type":"PACKAGE","url":"https://github.com/interaapps/pastefy"},{"type":"ARTICLE","url":"https://github.com/interaapps/pastefy/blob/7.2.6/frontend/src/components/previews/MermaidViewer.vue#L28-L80"},{"type":"FIX","url":"https://github.com/interaapps/pastefy/commit/caf35d8f279e2e1386a066753f2d644a0ba79507"},{"type":"REPORT","url":"https://github.com/interaapps/pastefy/issues/142"},{"type":"ADVISORY","url":"https://github.com/interaapps/pastefy/releases/tag/7.2.7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-130866"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/pastefy-7.2.1-before-7.2.7-stored-xss-via-mermaid-init-directive"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/interaapps/pastefy","events":[{"introduced":"cb864837d632d954fc014246b02a8cf3e589cd9b"},{"fixed":"caf35d8f279e2e1386a066753f2d644a0ba79507"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandardRange","range":[{"introduced":"7.2.1"},{"fixed":"7.2.7"}]},{"range":[{"fixed":"caf35d8f279e2e1386a066753f2d644a0ba79507"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"7.2.7","range":[{"fixed":"caf35d8f279e2e1386a066753f2d644a0ba79507"}]}]}}],"versions":["7.2.6","7.2.5","7.2.4","7.2.3","7.2.2","7.2.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-130866.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N"}]}