Neal Shah 9773d102ce security: add origin validation to Comlink message handler in service worker (#2)
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.
2026-09-25 17:25:39 -04:00
2026-02-03 15:43:56 -08:00
2026-02-03 15:43:56 -08:00
2026-02-03 17:07:32 -08:00
2026-02-03 17:07:32 -08:00
2026-02-03 17:14:02 -08:00
2026-02-03 15:43:56 -08:00
2026-02-03 17:07:32 -08:00
2026-02-04 11:59:18 -08:00
2026-02-03 18:10:28 -08:00
2026-02-03 15:45:32 -08:00
2026-02-03 16:52:32 -08:00

VSCode for Puter

Building: npm run build

S
Description
No description provided
Readme
260 KiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 65.6%
JavaScript 21.3%
HTML 13.1%