CVE-2026-130866

Pastefy 7.2.1 before 7.2.7 Stored XSS via Mermaid Init Directive

Published Nov 17, 2026 CVSS 4.0 · 5.3 Medium EPSS n/a KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Pastefy 7.2.1 through 7.2.6 contains a stored cross‑site scripting flaw in MermaidViewer.vue. The application forwards attacker‑supplied %%{init}%% directives to mermaid.mermaidAPI.updateSiteConfig(), causing the browser to execute the injected script when a paste is rendered. Because unauthenticated users can create pastes with the securityLevel set to loose and a permissive DOMPurify configuration, an attacker can inject JavaScript that harvests the viewer’s API session key and therefore impersonate that user on the platform.

Affected Systems

All installations of Pastefy version 7.2.1 up to 7.2.6, deployed by InteraApps, are affected. The vulnerability resides in the frontend component that processes Mermaid diagrams, so any instance exposing the public paste interface and using the default settings is vulnerable.

Risk and Exploitability

The CVSS score of 5.3 indicates a moderate severity, but the absence of an EPSS score and the lack of a KEV listing mean that exploitation activity has not yet been observed publicly. However, the attack vector requires only unauthenticated access to the paste creation endpoint, making it widely exploitable. Because the XSS payload can capture session tokens, the risk to confidentiality, integrity, and availability of authenticated users is significant.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pastefy to version 7.2.7 or later, which removes the vulnerable Mermaid init directive processing.
  • If an immediate upgrade is not possible, change the Mermaid configuration to set securityLevel to "strict" or disable custom init directives, and enforce a strict DOMPurify configuration.
  • Deploy a Content Security Policy that disallows inline scripts and restricts script origins to mitigate any residual XSS vectors.

Generated by OpenCVE AI on November 17, 2026 at 21:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description 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.
Title Pastefy 7.2.1 before 7.2.7 Stored XSS via Mermaid Init Directive
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.3, 'vector': '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'}

Subscriptions

No data.

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 17, 2026, 7:47 PM
Reserved
Nov 17, 2026, 5:51 PM
Status
Received
Published
Nov 17, 2026, 8:17 PM
Modified
Nov 17, 2026, 8:17 PM