mirror of
https://github.com/HeyPuter/vscode-web-puter.git
synced 2026-11-13 18:35:09 -10:00
master
Prevents cross-origin pages from establishing a Comlink bridge to access
the authToken and other sensitive data from the authenticated Puter SDK.
The vulnerability allowed an attacker to:
1. Open puter.com/app/code in a popup from their own origin
2. Use Comlink's windowEndpoint with wildcard origin ('*') to intercept messages
3. Capture the unscoped GUI credential and mint full-access tokens
4. Access victim's private files and accounts
This fix validates that message events only come from the same origin as the
service worker before accepting the MessagePort. Untrusted messages are rejected
and logged to console.
Fixes exploitation demonstrated in external security test case.
VSCode for Puter
Building: npm run build
Languages
TypeScript
65.6%
JavaScript
21.3%
HTML
13.1%