GHSA-w3hv-x4fp-6h6j: @grackle-ai/server has Missing WebSocket Origin Header Validation
The WebSocket upgrade handler in the server validates authentication (API key token or session cookie) but does not check the Origin header. A malicious webpage on a different origin could initiate a WebSocket connection to ws://localhost:3000/ws if it can leverage the user’s session cookie (which is SameSite=Lax, allowing top-level navigations).
This enables cross-origin WebSocket hijacking — if a user visits a malicious site while a Grackle session is active, the attacker’s page could open a WebSocket and subscribe to real-time events (session output, task updates, environment state).
Affected code:
packages/server/src/ws-bridge.ts:80-91— connection handler accepts WebSocket upgrades without checkingreq.headers.origin
References
Code Behaviors & Features
Detect and mitigate GHSA-w3hv-x4fp-6h6j with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →