Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

thinkinaixyz/deepchat
dev @ 90605e0
34
Fixes
5
CVEs
CRITICAL
Peak severity
25.0%
Coverage
Highlights
Path Traversal: 9 prior fixes. Scrutinize any change in this area.
src/main/lib/svgSanitizer.ts: most-fixed (2 issues). Treat as high-risk during review.
20 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Cross-Site Scripting (XSS): Unsafe innerHTML rendering of Mermaid diagram SVGs has consistently allowed stored XSS. In an Electron environment, this XSS is critical because it can be escalated to arbitrary system command execution via exposed IPC renderer bridges, as witnessed in CVE-2025-67744, CVE-2025-66481, CVE-2025-66222, and CVE-2025-58768.
Path Traversal: Agent-driven operations frequently attempt to access local files. Without canonicalization and prefix verification against the session workspace directory, malicious or confused agents can write or read files outside the sandbox, leading to arbitrary file access or localized sandbox escapes.
Auth Bypass: LLM-triggered tool calls bypass user consent prompts when permission checking resolves configuration from incorrect objects (e.g., assessing the default server configuration rather than the specific client hosting the tool, or querying the wrong property path on the tool response). This allows unauthorized tool executions.