CVE-2026-50758: DayuanJiang next-ai-draw-io reflected XSS in MCP server mcp parameter

CVE-2026-50758 · Severity: info · CVSS 8.1 · Published 2026-07-21

A security vulnerability exists in the next-ai-draw-io MCP server, a tool used to help AI agents like Claude and VS Code Copilot generate diagrams. By tricking a user into clicking a specially crafted link, an attacker can execute malicious code in the user's browser. This could allow the attacker to steal diagram data, modify active projects, or access sensitive intellectual property stored within the application.

Technologies: DayuanJiang Next-Ai-Draw-Io. Vendors: DayuanJiang.

Quick answers

Is CVE-2026-50758 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-50758 being exploited in the wild.
How severe is CVE-2026-50758?
Informational severity, with a CVSS score of 8.1, published 21 July 2026.
Which products and versions are affected?
DayuanJiang Next-Ai-Draw-Io <= 0.4.13.
Is there a fix for CVE-2026-50758?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-50758 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-50758?
Check whether you run DayuanJiang Next-Ai-Draw-Io at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A reflected Cross-Site Scripting (XSS) vulnerability exists in the @next-ai-drawio/mcp-server component of next-ai-draw-io. The vulnerability is located in `packages/mcp-server/src/http-server.ts`, where the `mcp` query parameter (representing a session ID) is read and interpolated directly into both HTML and JavaScript contexts without sanitization or escaping. Specifically, the input is placed inside a JavaScript string literal in a `<script>` block, allowing an attacker to break out of the string using a double-quote character and execute arbitrary code. The impact is further escalated by a wildcard CORS configuration (`Access-Control-Allow-Origin: *`) on the local HTTP server, enabling the injected script to exfiltrate diagram data via the server's API endpoints.

Affected products

  • DayuanJiang next-ai-draw-io <= 0.4.13
  • DayuanJiang @next-ai-drawio/mcp-server <= 0.1.16

Timeline

  • 2026-03-17: disclosed: Vulnerability discovered
  • 2026-07-21: advisory: CVE published by NVD/MITRE

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.