Read the docs
TI-2026-66422 Aliases GHSA-w3hv-x4fp-6h6j

@grackle-ai/server has Missing WebSocket Origin Header Validation

Priority LOW 38CWE-346Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
Security bypass
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-346.

Summary

### Impact 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 checking `req.headers.origin` ### Patches **Fix:** Validate `req.headers.origin` against an allowlist before accepting connections: ```typescript const origin = req.headers.origin || ""; if (origin && !origin.includes("localhost") && !origin.includes("127.0.0.1")) { ws.close(4003, "Invalid origin"); return; } ``` ### Workarounds Ensure the Grackle server is only accessible on `127.0.0.1` (the default). Do not use `--allow-network` in untrusted network environments. ### Resources - CWE-346: Origin Validation Error - File: `packages/server/src/ws-bridge.ts`

Why it matters now

Fix Fixed @grackle-ai/server (npm): 0.70.3

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—@grackle-ai/server (npm)before 0.70.30.70.3Patch availableGHSA-w3hv-x4fp-6h6j
  • @grackle-ai/server (npm) Vendor— Affected before 0.70.3 Fixed in 0.70.3 Patch available GHSA-w3hv-x4fp-6h6j

Remediation

  • Fix · GHSA-w3hv-x4fp-6h6j @grackle-ai/server (npm) Fixed in 0.70.3 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-w3hv-x4fp-6h6j

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences