The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-66222

CVE-2025-66222: Thinkinai Deepchat XSS Vulnerability

CVE-2025-66222 is a stored cross-site scripting flaw in Thinkinai Deepchat that can escalate to remote code execution via Electron IPC. This article covers the technical details, affected versions, and mitigation.

Published: March 18, 2026

CVE-2025-66222 Overview

DeepChat is a smart assistant application that leverages artificial intelligence capabilities. A critical Stored Cross-Site Scripting (XSS) vulnerability exists in the Mermaid diagram renderer in versions 0.5.0 and earlier. This vulnerability allows an attacker to execute arbitrary JavaScript within the application context. Due to the exposed Electron IPC bridge, this XSS vulnerability can be escalated to Remote Code Execution (RCE) by registering and starting a malicious MCP (Model Context Protocol) server.

Critical Impact

This vulnerability chain enables attackers to progress from Stored XSS to full Remote Code Execution through the Electron IPC bridge, potentially compromising the entire system running DeepChat.

Affected Products

  • Thinkinai DeepChat version 0.5.0 and earlier
  • All installations using the Mermaid diagram renderer feature
  • Electron-based DeepChat deployments with exposed IPC bridge

Discovery Timeline

  • 2025-12-03 - CVE-2025-66222 published to NVD
  • 2025-12-05 - Last updated in NVD database

Technical Details for CVE-2025-66222

Vulnerability Analysis

This vulnerability represents a dangerous attack chain combining two distinct weakness types: Stored Cross-Site Scripting (CWE-79) and Code Injection (CWE-94). The Mermaid diagram renderer in DeepChat fails to properly sanitize user-supplied input before rendering diagram content, allowing malicious JavaScript to be persistently stored and executed within the application context.

What makes this vulnerability particularly severe is the Electron architecture of DeepChat. Unlike traditional web applications where XSS is limited to browser context, Electron applications expose Inter-Process Communication (IPC) bridges that can interact with the underlying operating system. An attacker can leverage this exposed IPC bridge to register and start a malicious Model Context Protocol (MCP) server, effectively escalating from client-side script execution to full Remote Code Execution on the host system.

The attack requires user interaction, as the victim must view the maliciously crafted Mermaid diagram content. However, once triggered, the attacker gains significant control over the victim's system with high impact to confidentiality, integrity, and availability.

Root Cause

The root cause stems from insufficient input validation and output encoding in the Mermaid diagram rendering component. The application fails to properly sanitize diagram definition strings before processing them, allowing embedded JavaScript payloads to execute. Combined with an insecurely configured Electron IPC bridge that exposes sensitive system-level functionality to the renderer process, the vulnerability creates a direct path from user-controlled content to arbitrary code execution.

Attack Vector

The attack leverages a network-based vector where an attacker crafts a malicious Mermaid diagram payload containing JavaScript code. When this payload is stored in the application (such as through a shared chat or document) and subsequently rendered by a victim user, the embedded JavaScript executes in the Electron renderer context. The attacker's script then leverages the exposed IPC bridge to communicate with the main Electron process, registering a malicious MCP server that executes arbitrary commands on the underlying operating system.

The attack does require user interaction—the victim must open or view content containing the malicious diagram—but no privileges are required for the attacker to inject the payload. The scope change in the attack indicates that the compromised Electron renderer can affect resources beyond its security scope by reaching the host system through the IPC bridge.

Detection Methods for CVE-2025-66222

Indicators of Compromise

  • Unexpected MCP server registrations or processes spawned by DeepChat
  • Mermaid diagram content containing suspicious JavaScript code patterns such as <script> tags, event handlers, or javascript: URIs
  • Unusual IPC bridge activity or communications originating from the DeepChat renderer process
  • Anomalous network connections or child processes spawned by the DeepChat application

Detection Strategies

  • Monitor DeepChat logs and application data for Mermaid diagrams containing potentially malicious payloads
  • Implement endpoint detection rules to identify unusual process creation chains originating from DeepChat
  • Deploy application-level content security policies to detect XSS payload execution attempts
  • Monitor for unauthorized MCP server registration events within the application

Monitoring Recommendations

  • Enable verbose logging for DeepChat application activity and IPC communications
  • Configure EDR solutions to alert on suspicious child process spawning from Electron applications
  • Establish baseline network behavior for DeepChat and alert on deviations indicating potential C2 communications
  • Review stored content periodically for signs of injected malicious payloads

How to Mitigate CVE-2025-66222

Immediate Actions Required

  • Upgrade DeepChat to a version newer than 0.5.0 that includes the security fix
  • Audit existing stored content for potentially malicious Mermaid diagram payloads
  • Restrict network access for DeepChat installations if upgrade is not immediately possible
  • Consider temporarily disabling Mermaid diagram rendering functionality until patched

Patch Information

ThinkInAI has addressed this vulnerability in commit 371ca7b42e3685aee6e3f0c61e85277ed1ff4db7. Organizations running affected versions should update to the patched version immediately. The fix addresses both the XSS vulnerability in the Mermaid renderer and secures the Electron IPC bridge to prevent escalation to RCE.

For detailed patch information, refer to the GitHub Commit Update and the GitHub Security Advisory GHSA-v8v5-c872-mf8r.

Workarounds

  • Disable Mermaid diagram rendering functionality if the feature is not critical to operations
  • Implement network-level controls to restrict DeepChat's ability to spawn external connections
  • Run DeepChat in a sandboxed environment to limit the impact of potential RCE exploitation
  • Apply Content Security Policy headers if deploying in a web context to mitigate XSS execution
bash
# Example: Restrict DeepChat network access on Linux using iptables
# Block outbound connections from DeepChat process (adjust path as needed)
iptables -A OUTPUT -m owner --cmd-owner deepchat -j DROP

# Alternative: Run DeepChat with restricted permissions using firejail
firejail --net=none /path/to/deepchat

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechThinkinai Deepchat

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability0.27%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-94

  • CWE-79
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-67744: Thinkinai Deepchat RCE Vulnerability

  • CVE-2025-58768: Thinkinai Deepchat RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English