The vulnerability chain involves two critical flaws: 1) The getTextAssetContent function lacks path traversal checks, allowing attackers to read arbitrary files (CWE-22/CWE-24). This is exploited to leak the authentication token. 2) The WebSocket server in index.ts does not enforce origin validation (CWE-352 analog for WebSockets), enabling cross-origin attacks. Combined, these allow an attacker to hijack the WebSocket connection, exfiltrate the token via path traversal, and abuse authenticated RPC functions like writeStaticAssets() to achieve RCE. Both functions are directly referenced in the vulnerability details and code links, confirming their role in the exploit.