DeepChat's Mermaid rendering has XSS leading to RCE
DeepChat is a smart assistant uses artificial intelligence. Prior to version 0.3.5, in the Mermaid chart rendering component, there is a risky operation of directly using `innerHTML` to set user content. Therefore, any malicious content rendered via Mermaid will directly trigger the exploit chain, leading to command execution. This vulnerability is primarily caused by a failure to fully address the existing XSS issue in the project, leading to another exploit chain. The exploit chain is consistent with the report GHSA-hqr4-4gfc-5p2j, executing arbitrary JavaScript code via XSS and arbitrary commands via exposed IPC. Version 0.3.5 contains an updated fix.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-58768
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:04 UTC · Revision 1
Source evidence
DeepChat's Mermaid rendering has XSS leading to RCE
core-osv · Original sourcePublished 9 Sept 2025, 20:19 UTC
DeepChat is a smart assistant uses artificial intelligence. Prior to version 0.3.5, in the Mermaid chart rendering component, there is a risky operation of directly using `innerHTML` to set user content. Therefore, any malicious content rendered via Mermaid will directly trigger the exploit chain, leading to command execution. This vulnerability is primarily caused by a failure to fully address the existing XSS issue in the project, leading to another exploit chain. The exploit chain is consistent with the report GHSA-hqr4-4gfc-5p2j, executing arbitrary JavaScript code via XSS and arbitrary commands via exposed IPC. Version 0.3.5 contains an updated fix.
osv:CVE-2025-58768
Complete source record
{
"id": "cb7c285b077fc351e86594e6e7f23b6d1a726d448cf9fbc022ada20bd5932729",
"url": "https://osv.dev/vulnerability/CVE-2025-58768",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DeepChat's Mermaid rendering has XSS leading to RCE",
"summary": "DeepChat is a smart assistant uses artificial intelligence. Prior to version 0.3.5, in the Mermaid chart rendering component, there is a risky operation of directly using `innerHTML` to set user content. Therefore, any malicious content rendered via Mermaid will directly trigger the exploit chain, leading to command execution. This vulnerability is primarily caused by a failure to fully address the existing XSS issue in the project, leading to another exploit chain. The exploit chain is consistent with the report GHSA-hqr4-4gfc-5p2j, executing arbitrary JavaScript code via XSS and arbitrary commands via exposed IPC. Version 0.3.5 contains an updated fix.",
"evidence": "osv:CVE-2025-58768",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2025-58768",
"aliases": [
"CVE-2025-58768",
"GHSA-f7q5-vc93-wp6j"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/thinkinaixyz/deepchat",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "3dc73a9ddc1b634ef0c6cb6b037d11222273f3dd"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "0.3.5"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:thinkinai:deepchat:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "0.3.5"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v0.3.4",
"v0.3.3",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.9",
"v0.2.8",
"v0.2.5",
"v0.2.4",
"v0.2.3-1",
"v0.2.3",
"v0.2.2",
"v0.2.1",
"v0.2.0-1",
"v0.2.0",
"v0.1.1",
"v0.1.0",
"v0.0.16",
"v0.0.15",
"v0.0.14",
"v0.0.13",
"v0.0.12",
"v0.0.10",
"v0.0.11",
"v0.0.9",
"v0.0.7",
"v0.0.6",
"v0.0.5",
"v0.0.3",
"v0.0.2",
"v0.0.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-58768.json"
}
}
],
"modified": "2026-10-28T02:30:30.195483182Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58768.json",
"https://github.com/ThinkInAIXYZ/deepchat/security/advisories/GHSA-f7q5-vc93-wp6j",
"https://nvd.nist.gov/vuln/detail/CVE-2025-58768"
],
"provider_metadata": {
"cwe_ids": [
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/58xxx/CVE-2025-58768.json"
}
},
"related_cves": [
{
"value": "CVE-2025-58768",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497109,
"published_at": "2025-09-09T20:19:52.122+00:00"
}