{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.2.1"
                  },
                  {
                    "fixed": "7.2.7"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "caf35d8f279e2e1386a066753f2d644a0ba79507"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "7.2.7",
                "range": [
                  {
                    "fixed": "caf35d8f279e2e1386a066753f2d644a0ba79507"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "cb864837d632d954fc014246b02a8cf3e589cd9b"
            },
            {
              "fixed": "caf35d8f279e2e1386a066753f2d644a0ba79507"
            }
          ],
          "repo": "https://github.com/interaapps/pastefy",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/130xxx/CVE-2026-130866.json"
  },
  "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.",
  "id": "CVE-2026-130866",
  "modified": "2026-11-17T21:45:20.625231722Z",
  "published": "2026-11-17T19:47:30.307Z",
  "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"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Pastefy 7.2.1 before 7.2.7 Stored XSS via Mermaid Init Directive"
}