The vulnerability is a stored Cross-Site Scripting (XSS) issue within the Markdown rendering feature of OneUptime, specifically affecting Mermaid diagrams. The root cause is twofold. First, the Mermaid library was initialized with securityLevel: "loose", a setting that permits interactive JavaScript within the generated SVG diagrams. Second, the React component MermaidDiagram in Common/UI/Components/Markdown.tsx/MarkdownViewer.tsx took the SVG output from the Mermaid library and inserted it directly into the DOM via innerHTML without any sanitization. This combination allowed an attacker to embed malicious JavaScript in a Mermaid diagram (e.g., using the click directive). When a user viewed a page containing this malicious markdown (such as an incident note or status page), the script would execute, leading to potential session hijacking or other client-side attacks. The patch addresses this by changing the securityLevel to the safer default of "strict" and by introducing DOMPurify to sanitize the SVG before it is rendered, effectively neutralizing the XSS vector.